Catalog

Catalog.cacheTable(tableName)

Caches the specified table in-memory.

Catalog.clearCache()

Removes all cached tables from the in-memory cache.

Catalog.createExternalTable(tableName[, …])

Creates a table based on the dataset in a data source.

Catalog.createTable(tableName[, path, …])

Creates a table based on the dataset in a data source.

Catalog.currentDatabase()

Returns the current default database in this session.

Catalog.databaseExists(dbName)

Check if the database with the specified name exists.

Catalog.dropGlobalTempView(viewName)

Drops the global temporary view with the given view name in the catalog.

Catalog.dropTempView(viewName)

Drops the local temporary view with the given view name in the catalog.

Catalog.functionExists(functionName[, dbName])

Check if the function with the specified name exists.

Catalog.isCached(tableName)

Returns true if the table is currently cached in-memory.

Catalog.listColumns(tableName[, dbName])

Returns a list of columns for the given table/view in the specified database.

Catalog.listDatabases()

Returns a list of databases available across all sessions.

Catalog.listFunctions([dbName])

Returns a list of functions registered in the specified database.

Catalog.listTables([dbName])

Returns a list of tables/views in the specified database.

Catalog.recoverPartitions(tableName)

Recovers all the partitions of the given table and update the catalog.

Catalog.refreshByPath(path)

Invalidates and refreshes all the cached data (and the associated metadata) for any DataFrame that contains the given data source path.

Catalog.refreshTable(tableName)

Invalidates and refreshes all the cached data and metadata of the given table.

Catalog.registerFunction(name, f[, returnType])

An alias for spark.udf.register().

Catalog.setCurrentDatabase(dbName)

Sets the current default database in this session.

Catalog.tableExists(tableName[, dbName])

Check if the table or view with the specified name exists.

Catalog.uncacheTable(tableName)

Removes the specified table from the in-memory cache.