Replies: 1 comment
-
Hi This constraint is for snapshots only. By source we mean source for the snapshot. I. E. a model that the snapshot is snapshoting. A snapshot is a history table of another table. When I implemented this, the snapshot was created by making a clone of the source table with constraints and all. And with the "mechanics" behind how a snapshot works, it could not have constraints. If you have a primary key in the source table, it would be created in the snapshot table. But since you are storing multiple historical versions of a row. The primary key would be violated. A workaround is to create a view without constraints an use as source for the snapshot. |
Beta Was this translation helpful? Give feedback.
-
The documentation says "But, columns in source table can not have any constraints. If for example any column has a NOT NULL constraint, an error will be thrown."
sources.yml
, right?Beta Was this translation helpful? Give feedback.
All reactions