pbi_relocate_data_source
Bulk-rewrite hardcoded file paths in Power BI M partitions to relocate data sources and fix DataSource.NotFound errors after a workbook moves. Preview changes with dry run before applying.
Instructions
Bulk-rewrite a hardcoded file or folder path inside every M partition.
Use when a workbook moves and queries break with DataSource.NotFound. Looks
for old_path as a substring of each M-source partition expression and
replaces it with new_path. Calculated/query-source partitions are
skipped. dry_run=True returns the planned changes without writing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | ||
| new_path | Yes | ||
| old_path | Yes | ||
| refresh_after | No | ||
| case_sensitive | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |