Create a table constraint.
create_table_constraint.Rd
Creates a new table constraint.
Usage
create_table_constraint(client, full_name_arg, constraint)
tableConstraintsCreate(client, full_name_arg, constraint)
Arguments
- client
Required. Instance of DatabricksClient()
- full_name_arg
Required. The full name of the table referenced by the constraint.
- constraint
Required. A table constraint, as defined by one of the following fields being set: primary_key_constraint, foreign_key_constraint, named_table_constraint.
Details
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.