refresh_dataset_fields
Sync dataset fields with the DAX query structure. Adds missing fields and lists orphans after query rewrites, eliminating manual refresh steps.
Instructions
Sync a dataset's block against the shape detected in its DAX . Eliminates the manual 'open Report Builder → right-click → Refresh Fields' step after a query rewrite. Recognises SELECTCOLUMNS aliases and Table[Col] tokens (SUMMARIZECOLUMNS / ad-hoc). Adds missing fields; lists orphans without auto-removing (caller decides what to drop). Returns {added, orphans, unchanged, warnings}. Cheap regex-based detection — bare EVALUATE 'Table' returns a warning.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| dataset_name | Yes |