Caches the specified table in-memory.
Caches the specified table in-memory.
is either a qualified or unqualified name that designates a table/view. If no database identifier is provided, it refers to a temporary view or a table/view in the current database.
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 a table based on the dataset in a data source, a schema and a set of options.
:: Experimental :: (Scala-specific) Create a table based on the dataset in a data source, a schema and a set of options. Then, returns the corresponding DataFrame.
is either a qualified or unqualified name that designates a table. If no database identifier is provided, it refers to a table in the current database.
2.2.0
:: Experimental :: (Scala-specific) Creates a table based on the dataset in a data source and a set of options.
:: Experimental :: (Scala-specific) Creates a table based on the dataset in a data source and a set of options. Then, returns the corresponding DataFrame.
is either a qualified or unqualified name that designates a table. If no database identifier is provided, it refers to a table in the current database.
2.2.0
:: Experimental :: Creates a table from the given path based on a data source and returns the corresponding DataFrame.
:: Experimental :: Creates a table from the given path based on a data source and returns the corresponding DataFrame.
is either a qualified or unqualified name that designates a table. If no database identifier is provided, it refers to a table in the current database.
2.2.0
:: Experimental :: Creates a table from the given path and returns the corresponding DataFrame.
:: Experimental :: Creates a table from the given path and returns the corresponding DataFrame. It will use the default data source configured by spark.sql.sources.default.
is either a qualified or unqualified name that designates a table. If no database identifier is provided, it refers to a table in the current database.
2.2.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 unqualified name of the temporary 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 temporary 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.
is a name that designates a database.
is an unqualified name that designates a function.
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.
is either a qualified or unqualified name that designates a function. If no database identifier is provided, it refers to 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.
is a name that designates a database.
is an unqualified name that designates a function in the specified database
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. This throws an AnalysisException when the function cannot be found.
is either a qualified or unqualified name that designates a function. If no database identifier is provided, it refers to a temporary function or a function in the current database.
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. This throws an AnalysisException when no Table can be found.
is either a qualified or unqualified name that designates a table/view. If no database identifier is provided, it refers to a table/view in the current database.
2.1.0
Returns true if the table is currently cached in-memory.
Returns true if the table is currently cached in-memory.
is either a qualified or unqualified name that designates a table/view. If no database identifier is provided, it refers to a temporary view or a table/view in the current database.
2.0.0
Returns a list of columns for the given table/view in the specified database.
Returns a list of columns for the given table/view in the specified database.
is a name that designates a database.
is an unqualified name that designates a table/view.
2.0.0
Returns a list of columns for the given table/view or temporary view.
Returns a list of columns for the given table/view or temporary view.
is either a qualified or unqualified name that designates a table/view. If no database identifier is provided, it refers to a temporary view or a table/view in the current database.
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/views in the specified database.
Returns a list of tables/views in the specified database. This includes all temporary views.
2.0.0
Returns a list of tables/views in the current database.
Returns a list of tables/views in the current database. This includes all temporary views.
2.0.0
Recovers all the partitions in the directory of a table and update the catalog.
Recovers all the partitions in the directory of a table and update the catalog. Only works with a partitioned table, and not a view.
is either a qualified or unqualified name that designates a table. If no database identifier is provided, it refers to a table in the current database.
2.1.1
Invalidates and refreshes all the cached data (and the associated metadata) for any Dataset
that contains the given data source path.
Invalidates and refreshes all the cached data (and the associated metadata) for any Dataset
that contains the given data source path. Path matching is by prefix, i.e. "/" would invalidate
everything that is cached.
2.0.0
Invalidates and refreshes all the cached data and metadata of the given table.
Invalidates and refreshes all the cached data and 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.
is either a qualified or unqualified name that designates a table/view. If no database identifier is provided, it refers to a temporary view or a table/view in the current database.
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.
is a name that designates a database.
is an unqualified name that designates a table.
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.
is either a qualified or unqualified name that designates a table/view. If no database identifier is provided, it refers to 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.
is either a qualified or unqualified name that designates a table/view. If no database identifier is provided, it refers to a temporary view or a table/view in the current database.
2.0.0
:: Experimental :: Create a table based on the dataset in a data source, a schema and a set of options.
:: Experimental :: Create a table based on the dataset in a data source, a schema and a set of options. Then, returns the corresponding DataFrame.
is either a qualified or unqualified name that designates a table. If no database identifier is provided, it refers to a table in the current database.
2.2.0
:: Experimental :: Creates a table based on the dataset in a data source and a set of options.
:: Experimental :: Creates a table based on the dataset in a data source and a set of options. Then, returns the corresponding DataFrame.
is either a qualified or unqualified name that designates a table. If no database identifier is provided, it refers to a table in the current database.
2.2.0
(Scala-specific) Create a table from the given path based on a data source, a schema and a set of options.
(Scala-specific) Create a table from the given path based on a data source, a schema and a set of options. Then, returns the corresponding DataFrame.
is either a qualified or unqualified name that designates a table. If no database identifier is provided, it refers to a table in the current database.
(Since version 2.2.0) use createTable instead.
2.0.0
:: Experimental :: Create a table from the given path based on a data source, a schema and a set of options.
:: Experimental :: Create a table from the given path based on a data source, a schema and a set of options. Then, returns the corresponding DataFrame.
is either a qualified or unqualified name that designates a table. If no database identifier is provided, it refers to a table in the current database.
(Since version 2.2.0) use createTable instead.
2.0.0
(Scala-specific) Creates a table from the given path based on a data source and a set of options.
(Scala-specific) Creates a table from the given path based on a data source and a set of options. Then, returns the corresponding DataFrame.
is either a qualified or unqualified name that designates a table. If no database identifier is provided, it refers to a table in the current database.
(Since version 2.2.0) use createTable instead.
2.0.0
Creates a table from the given path based on a data source and a set of options.
Creates a table from the given path based on a data source and a set of options. Then, returns the corresponding DataFrame.
is either a qualified or unqualified name that designates a table. If no database identifier is provided, it refers to a table in the current database.
(Since version 2.2.0) use createTable instead.
2.0.0
Creates a table from the given path based on a data source and returns the corresponding DataFrame.
Creates a table from the given path based on a data source and returns the corresponding DataFrame.
is either a qualified or unqualified name that designates a table. If no database identifier is provided, it refers to a table in the current database.
(Since version 2.2.0) use createTable instead.
2.0.0
Creates a table from the given path and returns the corresponding DataFrame.
Creates a table from the given path and returns the corresponding DataFrame. It will use the default data source configured by spark.sql.sources.default.
is either a qualified or unqualified name that designates a table. If no database identifier is provided, it refers to a table in the current database.
(Since version 2.2.0) use createTable instead.
2.0.0
Catalog interface for Spark. To access this, use
SparkSession.catalog
.2.0.0