abstract class Catalog extends AnyRef
Catalog interface for Spark. To access this, use SparkSession.catalog.
- Annotations
- @Stable()
- Source
- Catalog.scala
- Since
2.0.0
- Alphabetic
- By Inheritance
- Catalog
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Catalog()
Abstract Value Members
- abstract def cacheTable(tableName: String, storageLevel: StorageLevel): Unit
Caches the specified table with the given storage level.
Caches the specified table with the given storage level.
- tableName
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.
- storageLevel
storage level to cache table.
- Since
2.3.0
- Note
Cached data is shared across all Spark sessions on the cluster.
- abstract def cacheTable(tableName: String): Unit
Caches the specified table in-memory.
Caches the specified table in-memory.
- tableName
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.
- Since
2.0.0
- Note
Cached data is shared across all Spark sessions on the cluster.
- abstract def clearCache(): Unit
Removes all cached tables from the in-memory cache.
Removes all cached tables from the in-memory cache.
- Since
2.0.0
- Note
Cached data is shared across all Spark sessions on the cluster, so clearing the cache affects all sessions.
- abstract def createTable(tableName: String, source: String, schema: StructType, description: String, options: Map[String, String]): DataFrame
(Scala-specific) Create a table based on the dataset in a data source, a schema and a set of options.
(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.
- tableName
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
3.1.0
- abstract def createTable(tableName: String, source: String, schema: StructType, options: Map[String, String]): DataFrame
(Scala-specific) Create a table based on the dataset in a data source, a schema and a set of options.
(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.
- tableName
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
2.2.0
- abstract def createTable(tableName: String, source: String, description: String, options: Map[String, String]): DataFrame
(Scala-specific) Creates a table based on the dataset in a data source and a set of options.
(Scala-specific) Creates a table based on the dataset in a data source and a set of options. Then, returns the corresponding DataFrame.
- tableName
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
3.1.0
- abstract def createTable(tableName: String, source: String, options: Map[String, String]): DataFrame
(Scala-specific) Creates a table based on the dataset in a data source and a set of options.
(Scala-specific) Creates a table based on the dataset in a data source and a set of options. Then, returns the corresponding DataFrame.
- tableName
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
2.2.0
- abstract def createTable(tableName: String, path: String, source: String): DataFrame
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.
- tableName
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
2.2.0
- abstract def createTable(tableName: String, path: String): DataFrame
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.
- tableName
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
2.2.0
- abstract def currentCatalog(): String
Returns the current catalog in this session.
Returns the current catalog in this session.
- Since
3.4.0
- abstract def currentDatabase: String
Returns the current database (namespace) in this session.
Returns the current database (namespace) in this session.
- Since
2.0.0
- abstract def databaseExists(dbName: String): Boolean
Check if the database (namespace) with the specified name exists (the name can be qualified with catalog).
Check if the database (namespace) with the specified name exists (the name can be qualified with catalog).
- Since
2.1.0
- abstract def dropGlobalTempView(viewName: String): Boolean
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.- viewName
the unqualified name of the temporary view to be dropped.
- returns
true if the view is dropped successfully, false otherwise.
- Since
2.1.0
- abstract def dropTempView(viewName: String): Boolean
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.view1to 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.
- viewName
the name of the temporary view to be dropped.
- returns
true if the view is dropped successfully, false otherwise.
- Since
2.0.0
- abstract def functionExists(functionName: String): Boolean
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.
- functionName
is either a qualified or unqualified name that designates a function. It follows the same resolution rule with SQL: search for built-in/temp functions first then functions in the current database (namespace).
- Since
2.1.0
- abstract def getDatabase(dbName: String): Database
Get the database (namespace) with the specified name (can be qualified with catalog).
Get the database (namespace) with the specified name (can be qualified with catalog). This throws an AnalysisException when the database (namespace) cannot be found.
- Annotations
- @throws("database does not exist")
- Since
2.1.0
- abstract def getFunction(functionName: String): Function
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.
- functionName
is either a qualified or unqualified name that designates a function. It follows the same resolution rule with SQL: search for built-in/temp functions first then functions in the current database (namespace).
- Annotations
- @throws("function does not exist")
- Since
2.1.0
- abstract def getTable(tableName: String): Table
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.
- tableName
is either a qualified or unqualified name that designates a table/view. It follows the same resolution rule with SQL: search for temp views first then table/views in the current database (namespace).
- Annotations
- @throws("table does not exist")
- Since
2.1.0
- abstract def isCached(tableName: String): Boolean
Returns true if the table is currently cached in-memory.
Returns true if the table is currently cached in-memory.
- tableName
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.
- Since
2.0.0
- abstract def listCatalogs(pattern: String): Dataset[CatalogMetadata]
Returns a list of catalogs which name match the specify pattern and available in this session.
Returns a list of catalogs which name match the specify pattern and available in this session.
- Since
3.5.0
- abstract def listCatalogs(): Dataset[CatalogMetadata]
Returns a list of catalogs available in this session.
Returns a list of catalogs available in this session.
- Since
3.4.0
- abstract def listColumns(tableName: String): Dataset[Column]
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.
- tableName
is either a qualified or unqualified name that designates a table/view. It follows the same resolution rule with SQL: search for temp views first then table/views in the current database (namespace).
- Annotations
- @throws("table does not exist")
- Since
2.0.0
- abstract def listDatabases(pattern: String): Dataset[Database]
Returns a list of databases (namespaces) which name match the specify pattern and available within the current catalog.
Returns a list of databases (namespaces) which name match the specify pattern and available within the current catalog.
- Since
3.5.0
- abstract def listDatabases(): Dataset[Database]
Returns a list of databases (namespaces) available within the current catalog.
Returns a list of databases (namespaces) available within the current catalog.
- Since
2.0.0
- abstract def listFunctions(dbName: String, pattern: String): Dataset[Function]
Returns a list of functions registered in the specified database (namespace) which name match the specify pattern (the name can be qualified with catalog).
Returns a list of functions registered in the specified database (namespace) which name match the specify pattern (the name can be qualified with catalog). This includes all built-in and temporary functions.
- Annotations
- @throws("database does not exist")
- Since
3.5.0
- abstract def listFunctions(dbName: String): Dataset[Function]
Returns a list of functions registered in the specified database (namespace) (the name can be qualified with catalog).
Returns a list of functions registered in the specified database (namespace) (the name can be qualified with catalog). This includes all built-in and temporary functions.
- Annotations
- @throws("database does not exist")
- Since
2.0.0
- abstract def listFunctions(): Dataset[Function]
Returns a list of functions registered in the current database (namespace).
Returns a list of functions registered in the current database (namespace). This includes all temporary functions.
- Since
2.0.0
- abstract def listTables(dbName: String, pattern: String): Dataset[Table]
Returns a list of tables/views in the specified database (namespace) which name match the specify pattern (the name can be qualified with catalog).
Returns a list of tables/views in the specified database (namespace) which name match the specify pattern (the name can be qualified with catalog). This includes all temporary views.
- Annotations
- @throws("database does not exist")
- Since
3.5.0
- abstract def listTables(dbName: String): Dataset[Table]
Returns a list of tables/views in the specified database (namespace) (the name can be qualified with catalog).
Returns a list of tables/views in the specified database (namespace) (the name can be qualified with catalog). This includes all temporary views.
- Annotations
- @throws("database does not exist")
- Since
2.0.0
- abstract def listTables(): Dataset[Table]
Returns a list of tables/views in the current database (namespace).
Returns a list of tables/views in the current database (namespace). This includes all temporary views.
- Since
2.0.0
- abstract def recoverPartitions(tableName: String): Unit
Recovers all the partitions in the directory of a table and updates the catalog.
Recovers all the partitions in the directory of a table and updates the catalog. Only works with a partitioned table, and not a view.
- tableName
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
2.1.1
- abstract def refreshByPath(path: String): Unit
Invalidates and refreshes all the cached data (and the associated metadata) for any
Datasetthat contains the given data source path.Invalidates and refreshes all the cached data (and the associated metadata) for any
Datasetthat contains the given data source path. Path matching is by checking for sub-directories, i.e. "/" would invalidate everything that is cached and "/test/parent" would invalidate everything that is a subdirectory of "/test/parent".- Since
2.0.0
- abstract def refreshTable(tableName: String): Unit
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.
- tableName
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.
- Since
2.0.0
- abstract def setCurrentCatalog(catalogName: String): Unit
Sets the current catalog in this session.
Sets the current catalog in this session.
- Since
3.4.0
- abstract def setCurrentDatabase(dbName: String): Unit
Sets the current database (namespace) in this session.
Sets the current database (namespace) in this session.
- Since
2.0.0
- abstract def tableExists(tableName: String): Boolean
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.
- tableName
is either a qualified or unqualified name that designates a table/view. It follows the same resolution rule with SQL: search for temp views first then table/views in the current database (namespace).
- Since
2.1.0
- abstract def uncacheTable(tableName: String): Unit
Removes the specified table from the in-memory cache.
Removes the specified table from the in-memory cache.
- tableName
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.
- Since
2.0.0
- Note
Cached data is shared across all Spark sessions on the cluster, so uncaching it affects all sessions.
- abstract def functionExists(dbName: String, functionName: String): Boolean
Check if the function with the specified name exists in the specified database under the Hive Metastore.
Check if the function with the specified name exists in the specified database under the Hive Metastore.
To check existence of functions in other catalogs, please use
functionExists(functionName)with qualified function name instead.- dbName
is an unqualified name that designates a database.
- functionName
is an unqualified name that designates a function.
- Annotations
- @deprecated
- Deprecated
(Since version 4.0.0) use functionExists(functionName: String) instead.
- Since
2.1.0
- abstract def getFunction(dbName: String, functionName: String): Function
Get the function with the specified name in the specified database under the Hive Metastore.
Get the function with the specified name in the specified database under the Hive Metastore. This throws an AnalysisException when the function cannot be found.
To get functions in other catalogs, please use
getFunction(functionName)with qualified function name instead.- dbName
is an unqualified name that designates a database.
- functionName
is an unqualified name that designates a function in the specified database
- Annotations
- @deprecated @throws("database or function does not exist")
- Deprecated
(Since version 4.0.0) use getFunction(functionName: String) instead.
- Since
2.1.0
- abstract def getTable(dbName: String, tableName: String): Table
Get the table or view with the specified name in the specified database under the Hive Metastore.
Get the table or view with the specified name in the specified database under the Hive Metastore. This throws an AnalysisException when no Table can be found.
To get table/view in other catalogs, please use
getTable(tableName)with qualified table/view name instead.- Annotations
- @deprecated @throws("database or table does not exist")
- Deprecated
(Since version 4.0.0) use getTable(tableName: String) instead.
- Since
2.1.0
- abstract def listColumns(dbName: String, tableName: String): Dataset[Column]
Returns a list of columns for the given table/view in the specified database under the Hive Metastore.
Returns a list of columns for the given table/view in the specified database under the Hive Metastore.
To list columns for table/view in other catalogs, please use
listColumns(tableName)with qualified table/view name instead.- dbName
is an unqualified name that designates a database.
- tableName
is an unqualified name that designates a table/view.
- Annotations
- @deprecated @throws("database or table does not exist")
- Deprecated
(Since version 4.0.0) use listColumns(tableName: String) instead.
- Since
2.0.0
- abstract def tableExists(dbName: String, tableName: String): Boolean
Check if the table or view with the specified name exists in the specified database under the Hive Metastore.
Check if the table or view with the specified name exists in the specified database under the Hive Metastore.
To check existence of table/view in other catalogs, please use
tableExists(tableName)with qualified table/view name instead.- dbName
is an unqualified name that designates a database.
- tableName
is an unqualified name that designates a table.
- Annotations
- @deprecated
- Deprecated
(Since version 4.0.0) use tableExists(tableName: String) instead.
- Since
2.1.0
Concrete 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 analyzeTable(tableName: String, noScan: Boolean = false): Unit
Computes table statistics (same as
ANALYZE TABLE ... COMPUTE STATISTICS).Computes table statistics (same as
ANALYZE TABLE ... COMPUTE STATISTICS).- tableName
table or view name; may be qualified with catalog and database (namespace).
- noScan
if true, use
NOSCANmode (reuse existing column statistics where possible).
- Since
4.2.0
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- def createDatabase(dbName: String, ifNotExists: Boolean, properties: Map[String, String]): Unit
(Scala-specific) Creates a namespace with optional properties map.
(Scala-specific) Creates a namespace with optional properties map.
- dbName
name of the namespace to create.
- ifNotExists
if true, do not fail when the namespace already exists.
- properties
map of namespace property keys to values.
- Since
4.2.0
- def createDatabase(dbName: String, ifNotExists: Boolean, properties: Map[String, String]): Unit
(Java-specific) Creates a namespace with optional properties (e.g.
(Java-specific) Creates a namespace with optional properties (e.g. comment, location keys as used by
CREATE NAMESPACE).- dbName
name of the namespace to create.
- ifNotExists
if true, do not fail when the namespace already exists.
- properties
string map of namespace properties.
- Since
4.2.0
- def createDatabase(dbName: String, ifNotExists: Boolean = false): Unit
Creates a namespace (database/schema).
Creates a namespace (database/schema).
dbNamemay be a multi-part identifier.- dbName
name of the namespace to create.
- ifNotExists
if true, do not fail when the namespace already exists.
- Since
4.2.0
- def createTable(tableName: String, source: String, schema: StructType, description: String, options: Map[String, String]): DataFrame
Create a table based on the dataset in a data source, a schema and a set of options.
Create a table based on the dataset in a data source, a schema and a set of options. Then, returns the corresponding DataFrame.
- tableName
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
3.1.0
- def createTable(tableName: String, source: String, schema: StructType, options: Map[String, String]): DataFrame
Create a table based on the dataset in a data source, a schema and a set of options.
Create a table based on the dataset in a data source, a schema and a set of options. Then, returns the corresponding DataFrame.
- tableName
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
2.2.0
- def createTable(tableName: String, source: String, description: String, options: Map[String, String]): DataFrame
Creates a table based on the dataset in a data source and a set of options.
Creates a table based on the dataset in a data source and a set of options. Then, returns the corresponding DataFrame.
- tableName
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
3.1.0
- def createTable(tableName: String, source: String, options: Map[String, String]): DataFrame
Creates a table based on the dataset in a data source and a set of options.
Creates a table based on the dataset in a data source and a set of options. Then, returns the corresponding DataFrame.
- tableName
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
2.2.0
- def dropDatabase(dbName: String, ifExists: Boolean = false, cascade: Boolean = false): Unit
Drops a namespace.
Drops a namespace.
- dbName
name of the namespace to drop; may be qualified with catalog name.
- ifExists
if true, do not fail when the namespace does not exist.
- cascade
if true, also drop tables and functions in the namespace.
- Since
4.2.0
- def dropTable(tableName: String, ifExists: Boolean = false, purge: Boolean = false): Unit
Drops a persistent table.
Drops a persistent table. This does not remove temp views (use
dropTempView).- tableName
name of the table to drop; may be qualified with catalog and database (namespace).
- ifExists
if true, do not fail when the table does not exist.
- purge
if true, skip moving data to a trash directory when the catalog supports it.
- Since
4.2.0
- def dropView(viewName: String, ifExists: Boolean = false): Unit
Drops a persistent view.
Drops a persistent view.
- viewName
name of the view to drop; may be qualified with catalog and database (namespace).
- ifExists
if true, do not fail when the view does not exist.
- Since
4.2.0
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def getCreateTableString(tableName: String, asSerde: Boolean = false): String
Returns the
SHOW CREATE TABLEDDL string for a relation.Returns the
SHOW CREATE TABLEDDL string for a relation.- tableName
table or view name; may be qualified with catalog and database (namespace).
- asSerde
if true, request Hive serde DDL when applicable.
- Since
4.2.0
- def getTableProperties(tableName: String): Map[String, String]
Returns all table properties as a map (same as
SHOW TBLPROPERTIES).Returns all table properties as a map (same as
SHOW TBLPROPERTIES).- tableName
table or view name; may be qualified with catalog and database (namespace).
- Since
4.2.0
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def listCachedTables(): Dataset[CachedTable]
Lists in-memory cache entries registered with an explicit name (via
CACHE TABLE,Catalog.cacheTable, etc.).Lists in-memory cache entries registered with an explicit name (via
CACHE TABLE,Catalog.cacheTable, etc.).Dataset.cache()without a name is not listed.- returns
a dataset of
CachedTablerows describing each named cache entry.
- Since
4.2.0
- def listPartitions(tableName: String): Dataset[CatalogTablePartition]
Lists partition value strings for a table (same as
SHOW PARTITIONS).Lists partition value strings for a table (same as
SHOW PARTITIONS).- tableName
name of the partitioned table; may be qualified with catalog and database (namespace).
- Since
4.2.0
- def listViews(dbName: String, pattern: String): Dataset[Table]
Lists views in the given namespace with a name pattern (SQL LIKE string).
Lists views in the given namespace with a name pattern (SQL LIKE string).
- dbName
namespace to list views from.
- pattern
SQL LIKE pattern for view names.
- returns
a dataset of
Tablerows for each matching view (same shape aslistTables).
- Annotations
- @throws("namespace does not exist")
- Since
4.2.0
- def listViews(dbName: String): Dataset[Table]
Lists views in the given namespace (can be catalog-qualified).
Lists views in the given namespace (can be catalog-qualified).
- dbName
namespace to list views from.
- returns
a dataset of
Tablerows for each view (same shape aslistTables).
- Annotations
- @throws("namespace does not exist")
- Since
4.2.0
- def listViews(): Dataset[Table]
Lists views in the current namespace.
Lists views in the current namespace.
- returns
a dataset of
Tablerows for each view (same shape aslistTables).
- Since
4.2.0
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def truncateTable(tableName: String): Unit
Truncates a table (removes all data from the table; not supported for views).
Truncates a table (removes all data from the table; not supported for views).
- tableName
name of the table to truncate; may be qualified with catalog and database (namespace).
- Since
4.2.0
- 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])
Deprecated Value Members
- def createExternalTable(tableName: String, source: String, schema: StructType, options: Map[String, String]): DataFrame
(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.
- tableName
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.
- Annotations
- @deprecated
- Deprecated
(Since version 2.2.0) use createTable instead.
- Since
2.0.0
- def createExternalTable(tableName: String, source: String, schema: StructType, options: Map[String, String]): DataFrame
Create a table from the given path based on a data source, a schema and a set of options.
Create a table from the given path based on a data source, a schema and a set of options. Then, returns the corresponding DataFrame.
- tableName
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.
- Annotations
- @deprecated
- Deprecated
(Since version 2.2.0) use createTable instead.
- Since
2.0.0
- def createExternalTable(tableName: String, source: String, options: Map[String, String]): DataFrame
(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.
- tableName
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.
- Annotations
- @deprecated
- Deprecated
(Since version 2.2.0) use createTable instead.
- Since
2.0.0
- def createExternalTable(tableName: String, source: String, options: Map[String, String]): DataFrame
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.
- tableName
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.
- Annotations
- @deprecated
- Deprecated
(Since version 2.2.0) use createTable instead.
- Since
2.0.0
- def createExternalTable(tableName: String, path: String, source: String): DataFrame
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.
- tableName
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.
- Annotations
- @deprecated
- Deprecated
(Since version 2.2.0) use createTable instead.
- Since
2.0.0
- def createExternalTable(tableName: String, path: String): DataFrame
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.
- tableName
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.
- Annotations
- @deprecated
- Deprecated
(Since version 2.2.0) use createTable instead.
- Since
2.0.0
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)