Unique Constraints on Optimizations
Could you add an option to create a unique (index) constraints in the index management dialog? If the constraint is violated the materialization process should fail and the last mat_stage (if available) should remain active.
Sometimes, due to unexpected behaviour, former unique data changes. In the worst case this causes duplicates in queries downstream. With a unique constraint this problem could be easily prevented without adding additional code to a view to enforce uniqueness.
-
Comment actionsOfficial comment
Hi Stefan,
we added this request to the list of our feature candidates. There is no ETA at this point of time. Upvotes from other customers could help us prioritize the feature development.
During the internal discussions the following topic was raised, that affects the usefulness of this feature:
The majority of our customers are using specialized anlytical databases like Azure Synapse, AWS Redshift, Snowflake) as analytical storage. One common characteristic of the above databases is that although they allow defining unique constraints, but they do not enforce them, so that a column defined as unique may still contain duplicate values.
A possible solution to this would be, that instead of creating unique column we would allow executing a user-defined parametrized SQL query, which could, depending on the user definition, create unique constraint or just validate the new materialization table and based on this validation decide whether to enable the new mattable or not.
best regards,
Nick
Please sign in to leave a comment.
Comments
1 comment