org.apache.spark.sql.catalog
Members list
Type members
Classlikes
The catalog interface for inspecting and managing catalogs, databases, tables, views, functions, and the query cache. Access it with spark.catalog. Mirrors org.apache.spark.sql.catalog.
The catalog interface for inspecting and managing catalogs, databases, tables, views, functions, and the query cache. Access it with spark.catalog. Mirrors org.apache.spark.sql.catalog.
Listing methods return typed Datasets (Dataset[Table], Dataset[Database], ...); predicate methods return a Boolean; command-like methods return Unit and run immediately.
spark.catalog.listTables().show()
spark.catalog.listTables().collect().map(_.name)
spark.catalog.tableExists("my_table") // => true
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
A catalog in Spark, as returned by Catalog.listCatalogs.
A catalog in Spark, as returned by Catalog.listCatalogs.
Value parameters
- description
-
description of the catalog (may be
null). - name
-
name of the catalog.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
A table property key and value, as returned by Catalog.getTableProperties.
A table property key and value, as returned by Catalog.getTableProperties.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
A column of a table, as returned by Catalog.listColumns.
A column of a table, as returned by Catalog.listColumns.
Value parameters
- dataType
-
the column's data type as a string.
- description
-
description of the column (may be
null). - isBucket
-
whether the column is a bucket column.
- isCluster
-
whether the column is a clustering column (always
falseon Spark 3.5 servers). - isPartition
-
whether the column is a partition column.
- name
-
name of the column.
- nullable
-
whether the column is nullable.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
A database in the catalog, as returned by Catalog.getDatabase / Catalog.listDatabases.
A database in the catalog, as returned by Catalog.getDatabase / Catalog.listDatabases.
Value parameters
- catalog
-
name of the catalog the database belongs to (may be
nullon older servers). - description
-
description of the database.
- locationUri
-
path (in the form of a uri) to data files.
- name
-
name of the database.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
A function in the catalog, as returned by Catalog.getFunction / Catalog.listFunctions.
A function in the catalog, as returned by Catalog.getFunction / Catalog.listFunctions.
Value parameters
- catalog
-
name of the catalog the function belongs to (may be
nullon older servers). - className
-
the fully qualified class name of the function.
- description
-
description of the function.
- isTemporary
-
whether the function is a temporary function.
- name
-
name of the function.
- namespace
-
the namespace the function belongs to;
null/empty for temporary functions.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
A table or view in the catalog, as returned by Catalog.getTable / Catalog.listTables.
A table or view in the catalog, as returned by Catalog.getTable / Catalog.listTables.
Value parameters
- catalog
-
name of the catalog the table belongs to (may be
nullon older servers). - description
-
description of the table.
- isTemporary
-
whether the table is a temporary view.
- name
-
name of the table.
- namespace
-
the namespace (database) the table belongs to; empty for temporary views.
- tableType
-
type of the table (e.g.
MANAGED,EXTERNAL,VIEW,TEMPORARY).
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
A partition of a table, as returned by Catalog.listPartitions (the same form as SHOW PARTITIONS, e.g. year=2024/month=1).
A partition of a table, as returned by Catalog.listPartitions (the same form as SHOW PARTITIONS, e.g. year=2024/month=1).
Value parameters
- partition
-
the partition description string.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all