class SQLContext extends sql.SQLContext
The entry point for working with structured data (rows and columns) in Spark 1.x.
As of Spark 2.0, this is replaced by SparkSession. However, we are keeping the class here for backward compatibility.
- Self Type
- SQLContext
- Annotations
- @Stable()
- Since
1.0.0
- Alphabetic
- By Inheritance
- SQLContext
- SQLContext
- Serializable
- Logging
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
Type Members
- implicit class LogStringContext extends AnyRef
- Definition Classes
- Logging
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def applySchema(rdd: JavaRDD[_], beanClass: Class[_]): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def applySchema(rdd: RDD[_], beanClass: Class[_]): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def applySchema(rowRDD: JavaRDD[Row], schema: StructType): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def applySchema(rowRDD: RDD[Row], schema: StructType): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def baseRelationToDataFrame(baseRelation: BaseRelation): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def cacheTable(tableName: String): Unit
- Definition Classes
- SQLContext
- def clearCache(): Unit
- Definition Classes
- SQLContext
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- def createDataFrame(data: List[_], beanClass: Class[_]): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def createDataFrame(rdd: JavaRDD[_], beanClass: Class[_]): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def createDataFrame(rdd: RDD[_], beanClass: Class[_]): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def createDataFrame(rows: List[Row], schema: StructType): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- Annotations
- @DeveloperApi()
- def createDataFrame(rowRDD: JavaRDD[Row], schema: StructType): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- Annotations
- @DeveloperApi()
- def createDataFrame(rowRDD: RDD[Row], schema: StructType): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- Annotations
- @DeveloperApi()
- def createDataFrame[A <: Product](data: Seq[A])(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[A]): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def createDataFrame[A <: Product](rdd: RDD[A])(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[A]): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def createDataset[T](data: List[T])(implicit arg0: Encoder[T]): Dataset[T]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def createDataset[T](data: RDD[T])(implicit arg0: Encoder[T]): Dataset[T]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def createDataset[T](data: Seq[T])(implicit arg0: Encoder[T]): Dataset[T]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def createExternalTable(tableName: String, source: String, schema: StructType, options: Map[String, String]): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def createExternalTable(tableName: String, source: String, schema: StructType, options: Map[String, String]): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def createExternalTable(tableName: String, source: String, options: Map[String, String]): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def createExternalTable(tableName: String, source: String, options: Map[String, String]): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def createExternalTable(tableName: String, path: String, source: String): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def createExternalTable(tableName: String, path: String): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def dropTempTable(tableName: String): Unit
- Definition Classes
- SQLContext
- def emptyDataFrame: Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def experimental: ExperimentalMethods
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- Annotations
- @Experimental() @transient() @Unstable()
- def getAllConfs: Map[String, String]
- Definition Classes
- SQLContext
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def getConf(key: String, defaultValue: String): String
- Definition Classes
- SQLContext
- def getConf(key: String): String
- Definition Classes
- SQLContext
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
- Attributes
- protected
- Definition Classes
- Logging
- def initializeLogIfNecessary(isInterpreter: Boolean): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def isCached(tableName: String): Boolean
- Definition Classes
- SQLContext
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isTraceEnabled(): Boolean
- Attributes
- protected
- Definition Classes
- Logging
- def jdbc(url: String, table: String, theParts: Array[String]): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def jdbc(url: String, table: String, columnName: String, lowerBound: Long, upperBound: Long, numPartitions: Int): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def jdbc(url: String, table: String): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def jsonFile(path: String, samplingRatio: Double): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def jsonFile(path: String, schema: StructType): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def jsonFile(path: String): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def jsonRDD(json: JavaRDD[String], samplingRatio: Double): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def jsonRDD(json: RDD[String], samplingRatio: Double): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def jsonRDD(json: JavaRDD[String], schema: StructType): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def jsonRDD(json: RDD[String], schema: StructType): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def jsonRDD(json: JavaRDD[String]): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def jsonRDD(json: RDD[String]): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def listenerManager: ExecutionListenerManager
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def load(source: String, schema: StructType, options: Map[String, String]): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def load(source: String, schema: StructType, options: Map[String, String]): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def load(source: String, options: Map[String, String]): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def load(source: String, options: Map[String, String]): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def load(path: String, source: String): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def load(path: String): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def log: Logger
- Attributes
- protected
- Definition Classes
- Logging
- def logDebug(msg: => String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logDebug(entry: LogEntry, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logDebug(entry: LogEntry): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logDebug(msg: => String): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logError(msg: => String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logError(entry: LogEntry, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logError(entry: LogEntry): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logError(msg: => String): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logInfo(msg: => String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logInfo(entry: LogEntry, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logInfo(entry: LogEntry): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logInfo(msg: => String): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logName: String
- Attributes
- protected
- Definition Classes
- Logging
- def logTrace(msg: => String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logTrace(entry: LogEntry, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logTrace(entry: LogEntry): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logTrace(msg: => String): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logWarning(msg: => String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logWarning(entry: LogEntry, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logWarning(entry: LogEntry): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logWarning(msg: => String): Unit
- Attributes
- protected
- Definition Classes
- Logging
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def newSession(): SQLContext
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- def parquetFile(paths: String*): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- Annotations
- @varargs()
- def range(start: Long, end: Long, step: Long, numPartitions: Int): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def range(start: Long, end: Long, step: Long): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def range(start: Long, end: Long): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def range(end: Long): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def read: DataFrameReader
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def readStream: streaming.DataStreamReader
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def setConf(props: Properties): Unit
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def setConf(key: String, value: String): Unit
- Definition Classes
- SQLContext
- def sparkContext: SparkContext
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- val sparkSession: SparkSession
- Definition Classes
- SQLContext → SQLContext
- def sql(sqlText: String): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def streams: streaming.StreamingQueryManager
Returns a
StreamingQueryManager
that allows managing all the StreamingQueries active onthis
context.Returns a
StreamingQueryManager
that allows managing all the StreamingQueries active onthis
context.- Definition Classes
- SQLContext → SQLContext
- Since
2.0.0
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def table(tableName: String): Dataset[Row]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def tableNames(databaseName: String): Array[String]
- Definition Classes
- SQLContext
- def tableNames(): Array[String]
- Definition Classes
- SQLContext
- def tables(databaseName: String): DataFrame
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def tables(): DataFrame
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def toString(): String
- Definition Classes
- AnyRef → Any
- def udf: UDFRegistration
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
- def uncacheTable(tableName: String): Unit
- Definition Classes
- SQLContext
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- def withLogContext(context: Map[String, String])(body: => Unit): Unit
- Attributes
- protected
- Definition Classes
- Logging
- object implicits extends SQLImplicits
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- SQLContext → SQLContext
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)