Skip to content

unitycatalog.schemas

The classes of the schemas API.

Classes

Name Description
ListSchemasResponse  
SchemaClient The requests on one SchemaInfo.
SchemaInfo A schema: the second layer of the three-level namespace. It holds tables, volumes, functions and models.

class unitycatalog.schemas.ListSchemasResponse

Attributes

  • next_page_token (str | None) – Opaque token of the next page. Absent on the last page.
  • schemas (list[SchemaInfo]) – The schemas.

class unitycatalog.schemas.SchemaClient

The requests on one SchemaInfo.

delete(*, force: bool | None = None) → None

Delete a schema.

Parameters

  • force (bool | None, optional) – Delete the tables, volumes, functions and models of the schema too.

Async: delete_async(…) → Future[None]

get(*, include_browse: bool | None = None) → SchemaInfo

Get a schema.

Parameters

  • include_browse (bool | None, optional) – Also answer a caller who sees the schema through the BROWSE privilege only, with its discovery fields and browse_only set.

Returns

  • SchemaInfo – A schema: the second layer of the three-level namespace. It holds tables, volumes, functions and models.

Async: get_async(…) → Future[SchemaInfo]

update(*,comment: str | None = None,properties: dict[str, str] | None = None,new_name: str | None = None,) → SchemaInfo

Change a schema.

Parameters

  • comment (str | None, optional) – User-provided free-form text description.
  • properties (dict[str, str] | None, optional) – Key-value properties of the schema. They replace the properties of the schema.
  • new_name (str | None, optional) – New name of the schema, relative to the parent catalog.

Returns

  • SchemaInfo – A schema: the second layer of the three-level namespace. It holds tables, volumes, functions and models.

Async: update_async(…) → Future[SchemaInfo]

class unitycatalog.schemas.SchemaInfo

A schema: the second layer of the three-level namespace. It holds tables, volumes, functions and models.

Attributes

  • browse_only (bool | None) – True when the schema has only the discovery fields that the BROWSE privilege allows.
  • catalog_name (str) – Name of the parent catalog.
  • comment (str | None) – User-provided free-form text description.
  • created_at (int) – Time at which the schema was created, in epoch milliseconds.
  • created_by (str | None) – Username of the creator of the schema.
  • full_name (str) – Full name of the schema, in the form <catalog>.<schema>.
  • name (str) – Name of the schema, relative to the parent catalog.
  • owner (str | None) – Username of the owner of the schema.
  • properties (dict[str, str]) – Key-value properties of the schema.
  • schema_id (str) – Unique identifier of the schema.
  • storage_location (str | None) – Storage location URL (full path) of the managed storage of the schema.
  • storage_root (str | None) – Storage root URL for the managed storage of the schema, such as s3://bucket/ucroot. Without it, managed tables and volumes of the schema go below the storage of the catalog.
  • updated_at (int) – Time at which the schema was last changed, in epoch milliseconds.
  • updated_by (str | None) – Username of the user who last changed the schema.