edit_model_offline
Apply structural edits to a Power BI TMDL model offline, preserving measures, relationships, and partitions. Ideal for template editing and source control workflows.
Instructions
STRUCTURE-ONLY offline model edit (NO Power BI Desktop, NO live engine): deserialize a TMDL model (a definition/ folder or a PBIP .SemanticModel - the model half export_tmdl / generate_pbip / unpack_to_source produce), apply the edits to the object tree, and re-serialize edited TMDL to outputFolder. The model STRUCTURE (measures, relationships, calc columns, tables, partition definitions) round-trips exactly. DATA IS NOT PRESERVED: TMDL carries no compressed VertiPaq data, so import (M) tables come back empty until a refresh. Use this for template / thin-model edits and source-control workflows. For a DATA-preserving edit of a loaded report use persist_model_edit (offline, M-free) or persist_open_model (Desktop). NOTE: a cold data .pbix that imports via M cannot be read offline - first export its model with export_tmdl from a live session, then edit that folder here.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| edits | Yes | JSON array of edit objects, each with an "op" | |
| tmdlFolder | Yes | a TMDL definition folder, a PBIP <name>.SemanticModel, or a project folder containing one | |
| outputFolder | Yes | output folder for the edited TMDL (created/overwritten) |