Primary and Foreign Keys

Data Warehouse does not enforce the uniqueness of primary keys. However, a non-unique value in a primary key column causes errors in the following situations:

  • During the load, if data is loaded into a table that has a pre-joined projection

  • In join queries at query time, if there is not exactly one dimension row that matches each foreign key value

Similarly, the referential integrity declared by a foreign key constraint is not enforced during the data load, unless there is a pre-join projection. However, it may result in a constraint validation error later if a join query is processed or a new pre-join projection is created.