Caches the specified table in-memory.
Caches the specified table in-memory.
2.0.0
Removes all cached tables from the in-memory cache.
Removes all cached tables from the in-memory cache.
2.0.0
:: Experimental :: (Scala-specific) Create an external table from the given path based on a data source, a schema and a set of options.
:: Experimental :: (Scala-specific) Create an external table from the given path based on a data source, a schema and a set of options. Then, returns the corresponding DataFrame.
2.0.0
:: Experimental :: Create an external table from the given path based on a data source, a schema and a set of options.
:: Experimental :: Create an external table from the given path based on a data source, a schema and a set of options. Then, returns the corresponding DataFrame.
2.0.0
:: Experimental :: (Scala-specific) Creates an external table from the given path based on a data source and a set of options.
:: Experimental :: (Scala-specific) Creates an external table from the given path based on a data source and a set of options. Then, returns the corresponding DataFrame.
2.0.0
:: Experimental :: Creates an external table from the given path based on a data source and a set of options.
:: Experimental :: Creates an external table from the given path based on a data source and a set of options. Then, returns the corresponding DataFrame.
2.0.0
:: Experimental :: Creates an external table from the given path based on a data source and returns the corresponding DataFrame.
:: Experimental :: Creates an external table from the given path based on a data source and returns the corresponding DataFrame.
2.0.0
:: Experimental :: Creates an external table from the given path and returns the corresponding DataFrame.
:: Experimental :: Creates an external table from the given path and returns the corresponding DataFrame. It will use the default data source configured by spark.sql.sources.default.
2.0.0
Returns the current default database in this session.
Returns the current default database in this session.
2.0.0
Check if the database with the specified name exists.
Check if the database with the specified name exists.
2.1.0
Drops the global temporary view with the given view name in the catalog.
Drops the global temporary view with the given view name in the catalog. If the view has been cached before, then it will also be uncached.
Global temporary view is cross-session. Its lifetime is the lifetime of the Spark application,
i.e. it will be automatically dropped when the application terminates. It's tied to a system
preserved database _global_temp
, and we must use the qualified name to refer a global temp
view, e.g. SELECT * FROM _global_temp.view1
.
the name of the view to be dropped.
true if the view is dropped successfully, false otherwise.
2.1.0
Drops the local temporary view with the given view name in the catalog.
Drops the local temporary view with the given view name in the catalog. If the view has been cached before, then it will also be uncached.
Local temporary view is session-scoped. Its lifetime is the lifetime of the session that
created it, i.e. it will be automatically dropped when the session terminates. It's not
tied to any databases, i.e. we can't use db1.view1
to reference a local temporary view.
Note that, the return type of this method was Unit in Spark 2.0, but changed to Boolean in Spark 2.1.
the name of the view to be dropped.
true if the view is dropped successfully, false otherwise.
2.0.0
Check if the function with the specified name exists in the specified database.
Check if the function with the specified name exists in the specified database.
2.1.0
Check if the function with the specified name exists.
Check if the function with the specified name exists. This can either be a temporary function or a function in the current database.
2.1.0
Get the database with the specified name.
Get the database with the specified name. This throws an AnalysisException when the database cannot be found.
2.1.0
Get the function with the specified name.
Get the function with the specified name. This throws an AnalysisException when the function cannot be found.
2.1.0
Get the function with the specified name.
Get the function with the specified name. This function can be a temporary function or a function in the current database. This throws an AnalysisException when the function cannot be found.
2.1.0
Get the table or view with the specified name in the specified database.
Get the table or view with the specified name in the specified database. This throws an AnalysisException when no Table can be found.
2.1.0
Get the table or view with the specified name.
Get the table or view with the specified name. This table can be a temporary view or a table/view in the current database. This throws an AnalysisException when no Table can be found.
2.1.0
Returns true if the table is currently cached in-memory.
Returns true if the table is currently cached in-memory.
2.0.0
Returns a list of columns for the given table in the specified database.
Returns a list of columns for the given table in the specified database.
2.0.0
Returns a list of columns for the given table in the current database or the given temporary table.
Returns a list of columns for the given table in the current database or the given temporary table.
2.0.0
Returns a list of databases available across all sessions.
Returns a list of databases available across all sessions.
2.0.0
Returns a list of functions registered in the specified database.
Returns a list of functions registered in the specified database. This includes all temporary functions
2.0.0
Returns a list of functions registered in the current database.
Returns a list of functions registered in the current database. This includes all temporary functions
2.0.0
Returns a list of tables in the specified database.
Returns a list of tables in the specified database. This includes all temporary tables.
2.0.0
Returns a list of tables in the current database.
Returns a list of tables in the current database. This includes all temporary tables.
2.0.0
Recover all the partitions in the directory of a table and update the catalog.
Recover all the partitions in the directory of a table and update the catalog.
2.1.1
Invalidate and refresh all the cached data (and the associated metadata) for any dataframe that contains the given data source path.
Invalidate and refresh all the cached data (and the associated metadata) for any dataframe that contains the given data source path. Path matching is by prefix, i.e. "/" would invalidate everything that is cached.
2.0.0
Invalidate and refresh all the cached metadata of the given table.
Invalidate and refresh all the cached metadata of the given table. For performance reasons, Spark SQL or the external data source library it uses might cache certain metadata about a table, such as the location of blocks. When those change outside of Spark SQL, users should call this function to invalidate the cache.
If this table is cached as an InMemoryRelation, drop the original cached version and make the new version cached lazily.
2.0.0
Sets the current default database in this session.
Sets the current default database in this session.
2.0.0
Check if the table or view with the specified name exists in the specified database.
Check if the table or view with the specified name exists in the specified database.
2.1.0
Check if the table or view with the specified name exists.
Check if the table or view with the specified name exists. This can either be a temporary view or a table/view in the current database.
2.1.0
Removes the specified table from the in-memory cache.
Removes the specified table from the in-memory cache.
2.0.0
Catalog interface for Spark. To access this, use
SparkSession.catalog
.2.0.0