polars.Catalog#

class polars.Catalog(workspace_url: str, *, bearer_token: str | None = 'auto')[source]#

Unity catalog client.

Warning

This functionality is considered unstable. It may be changed at any point without it being considered a breaking change.

__init__(workspace_url: str, *, bearer_token: str | None = 'auto') None[source]#

Initialize a catalog client.

Warning

This functionality is considered unstable. It may be changed at any point without it being considered a breaking change.

Parameters:
workspace_url

URL of the workspace, or alternatively the URL of the Unity catalog API endpoint.

bearer_token

Bearer token to authenticate with. This can also be set to: * “auto”: Automatically retrieve bearer tokens from the environment. * “databricks-sdk”: Use the Databricks SDK to retrieve and use the bearer token from the environment.

Methods

__init__(workspace_url, *[, bearer_token])

Initialize a catalog client.

create_catalog(catalog_name, *[, comment, ...])

Create a catalog.

create_namespace(catalog_name, namespace, *)

Create a namespace (unity schema) in the catalog.

create_table(catalog_name, namespace, ...[, ...])

Create a table in the catalog.

delete_catalog(catalog_name, *[, force])

Delete a catalog.

delete_namespace(catalog_name, namespace, *)

Delete a namespace (unity schema) in the catalog.

delete_table(catalog_name, namespace, table_name)

Delete the table stored at this location.

get_table_info(catalog_name, namespace, ...)

Retrieve the metadata of the specified table.

list_catalogs()

List the available catalogs.

list_namespaces(catalog_name)

List the available namespaces (unity schema) under the specified catalog.

list_tables(catalog_name, namespace)

List the available tables under the specified schema.

scan_table(catalog_name, namespace, ...[, ...])

Retrieve the metadata of the specified table.