update_power_query
Replace the entire Power Query M document in a .pbix file with new M code. Use on a closed copy of the file to safely edit DataMashup, while clearing permission bindings for recomputation.
Instructions
Replace the ENTIRE Section1.m (the full 'section Section1; shared Query = ...;' document) inside a .pbix's DataMashup, clearing PermissionBindings (Desktop recomputes the SHA-256 on open). RISKY - work on a COPY; the .pbix must be CLOSED in Desktop; refuses protected client paths.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| newM | Yes | the full replacement Section1.m document | |
| pbixPath | Yes | absolute path to the .pbix (a COPY) |