Skip to main content

System Schema

View as Markdown

SystemSchemaInfo object

schemastring

Name of the system schema.

statestring

The current state of enablement for the system schema. An empty string means the system schema is available and ready for opt-in. Possible values: AVAILABLE | ENABLE_INITIALIZED | ENABLE_COMPLETED | DISABLE_INITIALIZED | UNAVAILABLE | MANAGED

List

GET /api/2.1/unity-catalog/metastores/{metastore_id}/systemschemas

Gets an array of system schemas for a metastore. The caller must be an account admin or a metastore admin.

NOTE: we recommend using max_results=0 to use the paginated version of this API. Unpaginated calls will be deprecated soon.

PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.

API scopes: unity-catalog

Parameters

metastore_idstringpath

The ID for the metastore in which the system schema resides.

max_resultsint32query

Maximum number of schemas to return.

  • When set to 0, the page length is set to a server configured value (recommended);
  • When set to a value greater than 0, the page length is the minimum of this value and a server configured value;
  • When set to a value less than 0, an invalid parameter error is returned;
  • If not set, all the schemas are returned (not recommended).

Constraints: <= 1000

page_tokenstringquery

Opaque pagination token to go to next page based on previous query.

Response

Returns a list of SystemSchemaInfo objects.

Enable System Schema

PUT /api/2.1/unity-catalog/metastores/{metastore_id}/systemschemas/{schema}

Enables the system schema and adds it to the system catalog. The caller must be an account admin or a metastore admin.

API scopes: unity-catalog

Parameters

schemastringpath

Full name of the system schema.

metastore_idstringpath

The metastore ID under which the system schema lives.

Request body

catalog_namestring

the catalog for which the system schema is to enabled in

Disable System Schema

DELETE /api/2.1/unity-catalog/metastores/{metastore_id}/systemschemas/{schema}

Disables the system schema and removes it from the system catalog. The caller must be an account admin or a metastore admin.

API scopes: unity-catalog

Parameters

schemastringpath

Full name of the system schema.

metastore_idstringpath

The metastore ID under which the system schema lives.