public abstract class Catalog
extends java.lang.Object
SparkSession.catalog
.Constructor and Description |
---|
Catalog() |
Modifier and Type | Method and Description |
---|---|
abstract void |
cacheTable(java.lang.String tableName)
Caches the specified table in-memory.
|
abstract void |
clearCache()
Removes all cached tables from the in-memory cache.
|
abstract Dataset<Row> |
createExternalTable(java.lang.String tableName,
java.lang.String path)
:: Experimental ::
Creates an external table from the given path and returns the corresponding DataFrame.
|
abstract Dataset<Row> |
createExternalTable(java.lang.String tableName,
java.lang.String source,
java.util.Map<java.lang.String,java.lang.String> options)
:: Experimental ::
Creates an external table from the given path based on a data source and a set of options.
|
abstract Dataset<Row> |
createExternalTable(java.lang.String tableName,
java.lang.String source,
scala.collection.immutable.Map<java.lang.String,java.lang.String> options)
:: Experimental ::
(Scala-specific)
Creates an external table from the given path based on a data source and a set of options.
|
abstract Dataset<Row> |
createExternalTable(java.lang.String tableName,
java.lang.String path,
java.lang.String source)
:: Experimental ::
Creates an external table from the given path based on a data source
and returns the corresponding DataFrame.
|
abstract Dataset<Row> |
createExternalTable(java.lang.String tableName,
java.lang.String source,
StructType schema,
java.util.Map<java.lang.String,java.lang.String> options)
:: Experimental ::
Create an external table from the given path based on a data source, a schema and
a set of options.
|
abstract Dataset<Row> |
createExternalTable(java.lang.String tableName,
java.lang.String source,
StructType schema,
scala.collection.immutable.Map<java.lang.String,java.lang.String> options)
:: Experimental ::
(Scala-specific)
Create an external table from the given path based on a data source, a schema and
a set of options.
|
abstract java.lang.String |
currentDatabase()
Returns the current default database in this session.
|
abstract void |
dropTempView(java.lang.String viewName)
Drops the temporary view with the given view name in the catalog.
|
abstract boolean |
isCached(java.lang.String tableName)
Returns true if the table is currently cached in-memory.
|
abstract Dataset<Column> |
listColumns(java.lang.String tableName)
Returns a list of columns for the given table in the current database.
|
abstract Dataset<Column> |
listColumns(java.lang.String dbName,
java.lang.String tableName)
Returns a list of columns for the given table in the specified database.
|
abstract Dataset<Database> |
listDatabases()
Returns a list of databases available across all sessions.
|
abstract Dataset<Function> |
listFunctions()
Returns a list of functions registered in the current database.
|
abstract Dataset<Function> |
listFunctions(java.lang.String dbName)
Returns a list of functions registered in the specified database.
|
abstract Dataset<Table> |
listTables()
Returns a list of tables in the current database.
|
abstract Dataset<Table> |
listTables(java.lang.String dbName)
Returns a list of tables in the specified database.
|
abstract void |
setCurrentDatabase(java.lang.String dbName)
Sets the current default database in this session.
|
abstract void |
uncacheTable(java.lang.String tableName)
Removes the specified table from the in-memory cache.
|
public abstract java.lang.String currentDatabase()
public abstract void setCurrentDatabase(java.lang.String dbName)
dbName
- (undocumented)public abstract Dataset<Database> listDatabases()
public abstract Dataset<Table> listTables()
public abstract Dataset<Table> listTables(java.lang.String dbName) throws AnalysisException
dbName
- (undocumented)AnalysisException
public abstract Dataset<Function> listFunctions()
public abstract Dataset<Function> listFunctions(java.lang.String dbName) throws AnalysisException
dbName
- (undocumented)AnalysisException
public abstract Dataset<Column> listColumns(java.lang.String tableName) throws AnalysisException
tableName
- (undocumented)AnalysisException
public abstract Dataset<Column> listColumns(java.lang.String dbName, java.lang.String tableName) throws AnalysisException
dbName
- (undocumented)tableName
- (undocumented)AnalysisException
public abstract Dataset<Row> createExternalTable(java.lang.String tableName, java.lang.String path)
tableName
- (undocumented)path
- (undocumented)public abstract Dataset<Row> createExternalTable(java.lang.String tableName, java.lang.String path, java.lang.String source)
tableName
- (undocumented)path
- (undocumented)source
- (undocumented)public abstract Dataset<Row> createExternalTable(java.lang.String tableName, java.lang.String source, java.util.Map<java.lang.String,java.lang.String> options)
tableName
- (undocumented)source
- (undocumented)options
- (undocumented)public abstract Dataset<Row> createExternalTable(java.lang.String tableName, java.lang.String source, scala.collection.immutable.Map<java.lang.String,java.lang.String> options)
tableName
- (undocumented)source
- (undocumented)options
- (undocumented)public abstract Dataset<Row> createExternalTable(java.lang.String tableName, java.lang.String source, StructType schema, java.util.Map<java.lang.String,java.lang.String> options)
tableName
- (undocumented)source
- (undocumented)schema
- (undocumented)options
- (undocumented)public abstract Dataset<Row> createExternalTable(java.lang.String tableName, java.lang.String source, StructType schema, scala.collection.immutable.Map<java.lang.String,java.lang.String> options)
tableName
- (undocumented)source
- (undocumented)schema
- (undocumented)options
- (undocumented)public abstract void dropTempView(java.lang.String viewName)
viewName
- the name of the view to be dropped.public abstract boolean isCached(java.lang.String tableName)
tableName
- (undocumented)public abstract void cacheTable(java.lang.String tableName)
tableName
- (undocumented)public abstract void uncacheTable(java.lang.String tableName)
tableName
- (undocumented)public abstract void clearCache()