Foreign Key Mapping (Business Rule)
Applies to
Platform: Microsoft SQL Server · Snowflake · Snowflake dbt · Databricks · Databricks dbt · Fabric Lakehouse · Fabric Warehouse · Oracle
Architecture: Data Vault · Dimensional · Data Mart
This business rule checks that every relationship of a model object has a mapped foreign key term. It raises an error, which blocks generation in the client, and a warning on Link types. The rule ID is ID-10023.
Message
The client shows an error or a warning, depending on the model object type, with this text on the model object. <model object name> and <type> stand for its name and type.
Model object '<model object name>' of type '<type>' has relations without mapped foreign keys defined. For each relation a foreign key has to be mapped in at least one dataflow set.
On the model object card, point to the error or warning icon to see this message with the rule ID: Error ID-10023 or Warning ID-10023. The Generate Artifacts page lists the message without the ID.

Cause
No foreign key term of a relationship is mapped with an expression or a default value in any dataflow set. For a relationship without business key foreign keys, such as on a PIT, its additional foreign key terms count. The rule raises:
- An error on Entity, Fact, Mart Fact, PIT, Business PIT and the satellite types of Data Vault.
- A warning on Link, Same As Link, Hierarchical Link, Driving Key Link and their Business Vault variants.
Fix
- Open Manage Term Mappings of the model object.
- Map the foreign key term of the relationship in a dataflow set, see Edit a Term Mapping. The error or warning disappears.
If the relationship is not needed, delete it instead, see Delete a Relationship.
Check the result
The error or warning icon is gone from the model object. After the error is fixed, generation is no longer blocked by it.
Example
In a Data Mart project on Microsoft SQL Server, the Mart Fact load_truncate_insert_without_effective_timestamp has a relationship to the Mart Dimension common_pos. The mapping of its foreign key term FK_common_pos_common_POS_POS_ID is cleared. The client shows:
Model object 'load_truncate_insert_without_effective_timestamp' of type 'Mart Fact' has relations without mapped foreign keys defined. For each relation a foreign key has to be mapped in at least one dataflow set.
Related articles
- See also: Edit a Term Mapping, Delete a Relationship, Understand Relationships overview, Understand warnings and errors