- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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));
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2023 05:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2023 12:15 AM
HI @Debayan
I am creating inside unity catalog only because I have enabled unity catalog for my workspace.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2023 11:12 PM
Hi, this needs further investigation, could you please raise a support case with Databricks?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2023 05:23 AM

