Skip to main content

Database Catalog

View as Markdown

A Database Catalog registers a Postgres database that lives in a Lakebase database instance as a catalog in Unity Catalog, so that the database's schemas and tables are governed and discoverable through Unity Catalog. For an overview, see https://docs.databricks.com/aws/en/oltp/projects/register-uc.

DatabaseCatalog object​

A Database Catalog registers a Postgres database that lives in a Lakebase database instance as a catalog in Unity Catalog, so that the database's schemas and tables are governed and discoverable through Unity Catalog. For an overview, see https://docs.databricks.com/aws/en/oltp/projects/register-uc.

namestringPublic Preview

The name of the catalog in Unity Catalog.

database_instance_namestringPublic Preview

The name of the DatabaseInstance housing the database.

database_namestringPublic Preview

The name of the Postgres database in the instance that the catalog registers. The database must already exist unless create_database_if_not_exists is true. The system databases postgres, databricks_system, template0 and template1 cannot be registered.

uidstringPublic PreviewOutput only

An immutable UUID identifier for the catalog, assigned when the catalog is created.

create_database_if_not_existsbooleanPublic PreviewInput only

If true, the database named in database_name is created in the instance when it does not already exist, with the calling user as its owner. Defaults to false.

Get a Database Catalog Public Preview​

GET /api/2.0/database/catalogs/{name}

Get a Database Catalog.

For new workloads, Databricks recommends the Postgres API equivalent: Get a catalog.

API scopes: postgres

CloudsAWSAzure

Parameters​

namestringRequiredpath

The Unity Catalog name of the catalog to retrieve.

Response​

Returns the DatabaseCatalog object.

Create a Database Catalog Public Preview​

POST /api/2.0/database/catalogs

Create a Database Catalog.

For new workloads, Databricks recommends the Postgres API equivalent: Create a catalog.

API scopes: postgres

CloudsAWSAzure

Request body​

namestringRequired

The name of the catalog in Unity Catalog.

database_instance_namestringRequired

The name of the DatabaseInstance housing the database.

database_namestringRequired

The name of the Postgres database in the instance that the catalog registers. The database must already exist unless create_database_if_not_exists is true. The system databases postgres, databricks_system, template0 and template1 cannot be registered.

create_database_if_not_existsbooleanInput only

If true, the database named in database_name is created in the instance when it does not already exist, with the calling user as its owner. Defaults to false.

Response​

Returns the DatabaseCatalog object.

Delete a Database Catalog Public Preview​

DELETE /api/2.0/database/catalogs/{name}

Delete a Database Catalog. This removes the catalog from Unity Catalog, while the Postgres database and its tables remain in the instance.

For new workloads, Databricks recommends the Postgres API equivalent: Delete a catalog.

API scopes: postgres

CloudsAWSAzure

Parameters​

namestringRequiredpath

The Unity Catalog name of the catalog to delete.