Msg 104467, Level 16, State 1, Line 1
Enforced unique constraints are not supported in Azure SQL Data Warehouse. To create an unenforced unique constraint you must include the NOT ENFORCED syntax as part of your statement.
I’m getting the below error while trying to ADD CONSTRAINT in Azure DataWarehouse
azure-sql-data-warehouse
Related Question
- Azure SQL Data Warehouse – How to Add a Check Constraint
- Revision Tracking & Source Control for Azure SQL Data Warehouse
- How to Achieve a Many-to-One Merge Join in Azure Data Warehouse
- Sql-server – How to create a master key on the master database?What are the roles required to GRANT to the login and user of the master db for the same
- SQL Server – Prevent Dropping Tables but Allow Creating Within Schema
- Can the Data Export Service in Microsoft Dynamics export data to an Azure Synapse Data Warehouse
Best Answer
If you look at the list of Unsupported Table Features for Azure SQL Data Warehouse, unique constraints is still on that list as at today:
It may be that they get supported at some point in the future but I wouldn't hold your breath for this MPP system. As a workaround, get your ELT/ETL process to ensure records are unique during ingest for example, or make an assumption where the data has been imported from an upstream system which does have unqiue constraints, that it is valid. Do some validation via reports / queries to check.