erigaud
Honored Contributor

You can only declare Primary and foreign keys on fields on Unity Catalog

You also need Databricks Runtime 11.1+

Otherwise only NOT NULL and CHECK constraints are supported.

More info : https://docs.databricks.com/tables/constraints.html

View solution in original post