High severitycompilation
Power BI Refresh Error:
DbtSemanticModelEntityMappingError
What does this error mean?
A dbt semantic model definition contains an invalid entity mapping, preventing MetricFlow from understanding how to join measures across semantic models.
Common causes
- 1An entity column referenced in the semantic model does not exist in the underlying dbt model
- 2Two semantic models declare incompatible entity types for the same join key
- 3A foreign key entity references a primary key that is not declared in any other semantic model
- 4The entity type (primary, foreign, unique, natural) is incorrectly assigned
How to fix it
- 1Step 1: Run dbt parse to see the full entity mapping validation error.
- 2Step 2: Verify the entity column name exists in the underlying dbt model's output schema.
- 3Step 3: Check that entity types are consistent — a primary key in one semantic model must be referenced as a foreign key in models that join to it.
- 4Step 4: Use dbt ls --select tag:semantic_models to list all semantic models and trace the entity chain.
- 5Step 5: Refer to the MetricFlow entity documentation to confirm correct entity type assignments.