Skip to content

Set-SemanticModelParameters fails when a TMDL table filename casing differs from the table name definition #378

Description

@boycas

When using Set-SemanticModelParameters in our Azure DevOps release pipeline, the semantic model deployment fails with the following error:

LRO API Error: 'Workload_FailedToParseFile' - Dataset Workload failed to import the dataset with dataset id <GUID>. Cannot resolve all the paths while de-serializing Database.

Resolution Errors:
    Property FromColumn of object "relationship <oii><GUID></oii>" refers to an object which cannot be found

The error is thrown from:
FabricPS-PBIP.psm1:285

Root Cause
After investigating the issue, we found that it is caused by a casing mismatch between a table filename and the table name defined inside the file.
Example:
File:
definition\tables\fact_BetalingsachterstandenPerMaand.tmdl
Contents:
table fact_betalingsachterstandenPerMaand
Notice that the filename contains an uppercase B:
fact_BetalingsachterstandenPerMaand.tmdl
while the table definition contains a lowercase b:
table fact_betalingsachterstandenPerMaand
The table is referenced from relationships.tmdl as follows:

relationship <GUID>
    fromColumn: fact_betalingsachterstandenPerMaand.kalender_FK
    toColumn: dim_kalender.kalender_PK

Reproduction Steps

Create a table file:
definition\tables\fact_BetalingsachterstandenPerMaand.tmdl
Define the table inside the file as:
table fact_betalingsachterstandenPerMaand
Create a relationship referencing the table:

relationship <GUID>
    fromColumn: fact_betalingsachterstandenPerMaand.kalender_FK
    toColumn: dim_kalender.kalender_PK

Run:
Set-SemanticModelParameters
Deploy the semantic model using:
Import-FabricItem
The deployment fails with the error shown above.

Workaround
Rename the file so that the filename exactly matches the table name definition:
From:
definition\tables\fact_BetalingsachterstandenPerMaand.tmdl
To:
definition\tables\fact_betalingsachterstandenPerMaand.tmdl
After renaming the file, the deployment succeeds and the semantic model is deployed without errors.

Expected Behavior
Either:

  • The serializer/deserializer should handle filename casing consistently, or
  • A validation error should clearly indicate that the filename casing does not match the table definition.

For example:

Table filename casing does not match the defined table name.

Filename:
fact_BetalingsachterstandenPerMaand.tmdl

Table definition:
fact_betalingsachterstandenPerMaand

Additional Notes
This situation can easily occur after renaming a table in Power BI Desktop or another authoring tool where the table name is updated but the corresponding .tmdl filename is not.
The current error message points to a relationship resolution problem, which makes troubleshooting difficult because the actual root cause is a filename-to-table-name casing mismatch.
The issue only appears after Set-SemanticModelParameters loads and re-serializes the model. Without calling Set-SemanticModelParameters, the deployment succeeds. This suggests that the TMDL serialization/deserialization process is applying stricter case-sensitive validation and exposes the inconsistency during model reconstruction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions