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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"old_path": "<old_path>",
"new_path": "<new_path>"
},
"name": "pbi_relocate_data_source"
}
}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 |