Fabric Git Deploy Fails with ‘Unable to finish metadata synchronization’
Symptom
Deploying a semantic model from Git into a Fabric workspace fails with:
Unable to finish metadata synchronization
The message is generic. It does not name the object that caused the failure.
Cause
The model defined a shared M function as a model-level expression (expression LoadCsv) and every table partition called it. That shared function expression is what the deploy choked on.
Fix
Inline the full M into every partition. For a CSV source over the web, each partition holds its own complete Csv.Document(Web.Contents(...)) query. No shared function expressions.
How I Proved It
I bisected with four versions of the model:
- A minimal model deployed.
- Version A added the
LoadCsvshared function and failed. - Version B was the same model with the M inlined into each partition and passed.
- Version C added the relationships and 53 measures on top of B and passed.
The only change between A and B was the shared function, so that is the cause. This is what I observed on my own model. I have not tested every kind of shared expression, so a parameter or a non-function expression may behave differently.