Power BI Tip #11
Your semantic model is a folder of text now
A Power BI semantic model saves as 13 to 20 TMDL text files rather than one model.bim, so a measure change shows up as a diff and Desktop is not needed to read it.
Save a Power BI project as PBIP and the semantic model is not a file. It is a folder of TMDL text,
one file per table, and you can read all of it in any editor. The eight models in the
FabricTools/pbir-samples repository come to between 13 and 20 files each - the smallest is 24 KB of text, the
largest 314 KB, and every one of them is diffable.
One file per table changes what a review looks like
The model folder holds definition.pbism, definition/database.tmdl for the compatibility level,
definition/model.tmdl, definition/relationships.tmdl with every relationship in one place,
definition/cultures/ for the culture’s linguistic metadata, and definition/tables/ with one file per
table carrying its DAX. Rename a measure or change a
calculation in Sales and the pull request shows a few changed lines in tables/Sales.tmdl. The same
edit in the older TMSL format is a change inside a single model.bim, and a diff of a file like that
tells you nothing - if your repository still holds one, that is what you have.
Two files in the project belong to your machine, not the model
Every model folder also carries a .pbi folder. Two of its files are yours alone. Learn singles out localSettings.json as holding settings that apply only for the current user
and computer, and says to exclude it from source control. The samples in that repository ignore exactly
two files - **/.pbi/localSettings.json and **/.pbi/cache.abf - and commit editorSettings.json
next to them. That split is the useful part:
cache.abf is a binary model cache and localSettings.json records your machine, while
editorSettings.json is shared editor state that the team may as well have. A repository that
commits the first two gains a blob that changes on every open.
What this gives you
A model you can review line by line, search with grep, and open without Desktop; and a tidy project folder, because the two files that change per machine are named and excluded.