You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-- Create a table with a primary key> CREATE TABLE persons(first_name STRING NOT NULL, last_name STRING NOT NULL, nickname STRING,
CONSTRAINT persons_pk PRIMARY KEY(first_name, last_name));
-- create a table with a foreign key> CREATE TABLE pets(name STRING, owner_first_name STRING, owner_last_name STRING,
CONSTRAINT pets_persons_fk FOREIGN KEY (owner_first_name, owner_last_name) REFERENCES persons);
-- Create a table with a single column primary key and system generated name> CREATE TABLE customers(customerid STRING NOT NULLPRIMARY KEY, name STRING);
-- Create a table with a names single column primary key and a named single column foreign key> CREATE TABLE orders(orderid BIGINTNOT NULLCONSTRAINT orders_pk PRIMARY KEY,
customerid STRING CONSTRAINT orders_customers_fk REFERENCES customers);
Willingness to contribute
The Delta Lake Community encourages new feature contributions. Would you or another member of your organization be willing to contribute an implementation of this feature?
Yes. I can contribute this feature independently.
Yes. I would be willing to contribute this feature with guidance from the Delta Lake community.
No. I cannot contribute this feature at this time.
The text was updated successfully, but these errors were encountered:
Hey ,
I have tried this primary key constraints in databricks but its not working it's allowing duplicate values in the primary key column of table. Could you provide any solution for this that would be greatly appreciated 🙏
Feature request
Which Delta project/connector is this regarding?
Overview
Support SQL syntax for PRIMARY KEY information in Delta Tables (of course, without enforcing primary key, similarly as in Databricks)
Further details
please see: https://docs.databricks.com/en/sql/language-manual/sql-ref-syntax-ddl-create-table-constraint.html
examples:
Willingness to contribute
The Delta Lake Community encourages new feature contributions. Would you or another member of your organization be willing to contribute an implementation of this feature?
The text was updated successfully, but these errors were encountered: