table_constraints
Creates, updates, deletes, gets or lists a table_constraints
resource.
Overview
Name | table_constraints |
Type | Resource |
Id | databricks_workspace.unitycatalog.table_constraints |
Fields
The following fields are returned by SELECT
queries:
SELECT
not supported for this resource, use SHOW METHODS
to view available operations for the resource.
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
create | insert | deployment_name | Creates a new table constraint. | |
delete | delete | deployment_name | Deletes a table constraint. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
deployment_name | string | The Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc) |
INSERT
examples
- create
- Manifest
Creates a new table constraint.
INSERT INTO databricks_workspace.unitycatalog.table_constraints (
data__full_name_arg,
data__constraint,
deployment_name
)
SELECT
'{{ full_name_arg }}',
'{{ constraint }}',
'{{ deployment_name }}'
RETURNING
foreign_key_constraint,
named_table_constraint,
primary_key_constraint
;
# Description fields are for documentation purposes
- name: table_constraints
props:
- name: deployment_name
value: string
description: Required parameter for the table_constraints resource.
- name: full_name_arg
value: required
- name: constraint
value: required
DELETE
examples
- delete
Deletes a table constraint.
DELETE FROM databricks_workspace.unitycatalog.table_constraints
WHERE deployment_name = '{{ deployment_name }}' --required;