microsoft / microsoft/Analysis-Services
Set-SemanticModelParameters fails when a TMDL table filename casing differs from the table name definition
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 732
- Forks
- 433
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with FabricPS-PBIP.psm1 around line 285 and reproduce the failure using the mismatched TMDL filename, Set-SemanticModelParameters, and Import-FabricItem. Trace how the model is serialized and deserialized, then verify that casing is handled consistently or that a specific filename-definition validation error is emitted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100