cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

drop or alter primary key constraint for a streaming table in delta live tables

UM1
Visitor

I have a dlt streaming table with a primary key constraint defined through the schema definitions. I have redeployed the same dlt pipeline with the same target. When attempting to run the pipeline, I get the error,  ErrorClass=RESOURCE_ALREADY_EXISTS. Constraint with name `pk_constraint_name` already exists, choose a different name.

I can't find the constraint in information_schema.constraint_table_usage, and thought that the constraint is deleted, but the same error persists when rerunning with the constraint.

Is there a way to alter or drop the schema constraint? It seems to remember it even after running full refresh without constraint and then putting the same constraint back in.

 

 

 

0 REPLIES 0

Connect with Databricks Users in Your Area

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