Uc Tables
Manage governed data and schema-level assets
Create Table Constraint GA
POST
Creates a new table constraint.
For the table constraint creation to succeed, the user must satisfy both of these conditions:
- the user must have the USE_CATALOG privilege on the table's parent catalog, the USE_SCHEMA privilege on the table's parent schema, and be the owner of the table.
- if the new constraint is a ForeignKeyConstraint, the user must have the USE_CATALOG privilege on the referenced parent table's catalog, the USE_SCHEMA privilege on the referenced parent table's schema, and be the owner of the referenced parent table.
API scopes: unity-catalog
Request body
- full_name_argstring
The full name of the table referenced by the constraint.
- constraintobject
Show child attributesHide child attributes
- primary_key_constraintobjectRequired
Show child attributesHide child attributes
- namestring
The name of the constraint.
- child_columnsarray of string
Column names for this constraint.
- timeseries_columnsarray of string
Column names that represent a timeseries.
- relyboolean
True if the constraint is RELY, false or unset if NORELY.
- foreign_key_constraintobjectRequired
Show child attributesHide child attributes
- namestring
The name of the constraint.
- child_columnsarray of string
Column names for this constraint.
- parent_tablestring
The full name of the parent constraint.
- parent_columnsarray of string
Column names for this constraint.
- relyboolean
True if the constraint is RELY, false or unset if NORELY.
- named_table_constraintobjectRequired
Show child attributesHide child attributes
- namestring
The name of the constraint.
Response
- primary_key_constraintobjectRequired
Show child attributesHide child attributes
- namestring
The name of the constraint.
- child_columnsarray of string
Column names for this constraint.
- timeseries_columnsarray of string
Column names that represent a timeseries.
- relyboolean
True if the constraint is RELY, false or unset if NORELY.
- foreign_key_constraintobjectRequired
Show child attributesHide child attributes
- namestring
The name of the constraint.
- child_columnsarray of string
Column names for this constraint.
- parent_tablestring
The full name of the parent constraint.
- parent_columnsarray of string
Column names for this constraint.
- relyboolean
True if the constraint is RELY, false or unset if NORELY.
- named_table_constraintobjectRequired
Show child attributesHide child attributes
- namestring
The name of the constraint.
Delete Table Constraint GA
DELETE
Deletes a table constraint.
For the table constraint deletion to succeed, the user must satisfy both of these conditions:
- the user must have the USE_CATALOG privilege on the table's parent catalog, the USE_SCHEMA privilege on the table's parent schema, and be the owner of the table.
- if cascade argument is true, the user must have the following permissions on all of the child tables: the USE_CATALOG privilege on the table's catalog, the USE_SCHEMA privilege on the table's schema, and be the owner of the table.
API scopes: unity-catalog
Parameters
- full_name_argstringpath
Full name of the table referenced by the constraint.
- constraint_namestringquery
The name of the constraint to delete.
- cascadebooleanquery
If true, try deleting all child constraints of the current constraint. If false, reject this operation if the current constraint has any child constraints.
List Table Summaries GA
GET
Gets an array of summaries for tables for a schema and catalog within the metastore. The table summaries returned are either:
- summaries for tables (within the current metastore and parent catalog and schema), when the user is a metastore admin, or:
- summaries for tables and schemas (within the current metastore and parent catalog) for which the user has ownership or the SELECT privilege on the table and ownership or USE_SCHEMA privilege on the schema, provided that the user also has ownership or the USE_CATALOG privilege on the parent catalog.
There is no guarantee of a specific ordering of the elements in the array.
PAGINATION BEHAVIOR: The API is by default paginated, 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
- catalog_namestringquery
Name of parent catalog for tables of interest.
- schema_name_patternstringquery
A sql LIKE pattern (% and _) for schema names. All schemas will be returned if not set or empty.
- table_name_patternstringquery
A sql LIKE pattern (% and _) for table names. All tables will be returned if not set or empty.
- max_resultsint32query
Maximum number of summaries for tables to return. If not set, the page length is set to a server configured value (10000, as of 1/5/2024).
- when set to a value greater than 0, the page length is the minimum of this value and a server configured value (10000, as of 1/5/2024);
- when set to 0, the page length is set to a server configured value (10000, as of 1/5/2024) (recommended);
- when set to a value less than 0, an invalid parameter error is returned;
- page_tokenstringquery
Opaque pagination token to go to next page based on previous query.
- include_manifest_capabilitiesbooleanquery
Whether to include a manifest containing table capabilities in the response.
Response
- tablesarray of object
List of table summaries.
Show child attributesHide child attributes
- full_namestring
The full name of the table.
- table_typestring
- securable_kind_manifestobject
SecurableKindManifest of table, including capabilities the table has.
Show child attributesHide child attributes
- securable_typestring
Securable Type of the kind.
- securable_kindstring
Securable kind to get manifest of.
- assignable_privilegesarray of string
Privileges that can be assigned to the securable.
- optionsarray of object
Detailed specs of allowed options.
Show child attributesHide child attributes
- namestring
The unique name of the option.
- typestring
The type of the option.
- default_valuestring
The default value of the option, for example, value '443' for 'port' option.
- allowed_valuesarray of string
For drop down / radio button selections, UI will want to know the possible input values, it can also be used by other option types to limit input selections.
- hintstring
The hint is used on the UI to suggest what the input value can possibly be like, for example: example.com for 'host' option. Unlike default value, it will not be applied automatically without user input.
- descriptionstring
A concise user facing description of what the input value of this option should look like.
- is_requiredboolean
Is the option required.
- is_secretboolean
Is the option value considered secret and thus redacted on the UI.
- is_updatableboolean
Is the option updatable by users.
- oauth_stagestring
Specifies when the option value is displayed on the UI within the OAuth flow.
- is_loggableboolean
Specifies whether this option is safe to log, i.e. no sensitive information.
- is_creatableboolean
Indicates whether an option can be provided by users in the create/update path of an entity.
- is_copiableboolean
Indicates whether an option should be displayed with copy button on the UI.
- capabilitiesarray of string
A list of capabilities in the securable kind.
- next_page_tokenstring
Opaque token to retrieve the next page of results. Absent if there are no more pages. page_token should be set to this value for the next request (for the next page of results).
Table Exists GA
GET
Gets if a table exists in the metastore for a specific catalog and schema. The caller must satisfy one of the following requirements:
- Be a metastore admin
- Be the owner of the parent catalog
- Be the owner of the parent schema and have the USE_CATALOG privilege on the parent catalog
- Have the USE_CATALOG privilege on the parent catalog and the USE_SCHEMA privilege on the parent schema, and either be the table owner or have the SELECT privilege on the table.
- Have BROWSE privilege on the parent catalog
- Have BROWSE privilege on the parent schema
API scopes: unity-catalog
Parameters
- full_name_argstringpath
Full name of the table.
Response
- table_existsboolean
Whether the table exists or not.