08-23-2023 11:29 PM
Hi Team,
Getting below error while creating a table with primary key,
"Table constraints are only supported in Unity Catalog."
Table script :
CREATE TABLE persons(first_name STRING NOT NULL, last_name STRING NOT NULL, nickname STRING,CONSTRAINT persons_pk PRIMARY KEY(first_name, last_name));
08-28-2023 05:23 AM
08-24-2023 12:10 AM - edited 08-24-2023 12:13 AM
Hi, primary key is not supported outside Unity Catalog.
Please refer: https://docs.databricks.com/en/tables/constraints.html#declare-primary-key-and-foreign-key-relations...
Please let us know if this helps, also, please tag @Debayan with your next comment which will notify me. Thanks!
08-24-2023 12:15 AM
HI @Debayan
I am creating inside unity catalog only because I have enabled unity catalog for my workspace.
08-24-2023 11:12 PM
Hi, this needs further investigation, could you please raise a support case with Databricks?
08-24-2023 11:45 PM
Hi @Debayan ,
I have enabled unity catalog for my SQL warehouse like below, Could you please verify, is this correct way of enabling unity catalog or am doing anything wrong. It will be good if u will provide correct steps for enabling unity catalog for workspace
Please find the attached screen shot
08-28-2023 05:21 AM
Hi, Did you also enable it from the account console? https://docs.databricks.com/en/data-governance/unity-catalog/enable-workspaces.html#enable-your-work...
08-28-2023 05:23 AM
Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.
If there isn’t a group near you, start one and help create a community that brings people together.
Request a New Group