Legacy Entry Points#
SQLContext was the primary entry point for Spark SQL in Spark 1.x.
As of Spark 2.0, it has been replaced by SparkSession.
These classes are retained for backward compatibility only.
Deprecated since version 3.0.0: Use SparkSession.builder.getOrCreate() instead.
Note
Under Spark Connect, SQLContext.registerJavaFunction() and the whole
HiveContext are not supported and raise
PySparkNotImplementedError,
since they rely on a JVM SparkContext that does not exist in Connect mode.
SQLContext#
|
The entry point for working with structured data (rows and columns) in Spark, in Spark 1.x. |
|
Get the existing SQLContext or create a new one with given SparkContext. |
Returns a new SQLContext as new session, that has separate SQLConf, registered temporary views and UDFs, but shared SparkContext and table cache. |
|
|
Sets the given Spark SQL configuration property. |
|
Returns the value of Spark SQL configuration property for the given key. |
Returns a |
|
Returns a |
|
|
Create a |
|
An alias for |
|
An alias for |
|
Creates a |
|
Registers the given |
|
Remove the temporary table from catalog. |
|
Creates an external table based on the dataset in a data source. |
|
Returns a |
|
Returns the specified table or view as a |
|
Returns a |
|
Returns a list of names of tables in the database |
|
Caches the specified table in-memory. |
|
Removes the specified table from the in-memory cache. |
Removes all cached tables from the in-memory cache. |
|
Returns a |
|
Returns a |
|
Returns a |
HiveContext#
|
A variant of Spark SQL that integrates with data stored in Hive. |