Medium severityconfiguration
Power BI Refresh Error:
MacroInvalidDispatchArgError
What does this error mean?
dbt could not dispatch a macro call because the arguments passed do not match any of the available macro signatures for the target adapter. This typically occurs when using adapter-specific macros (e.g., dbt_utils cross-database macros) or when calling a custom macro with wrong argument names or types.
Common causes
- 1A macro is called with a positional argument where a keyword argument is required, or vice versa
- 2A `dbt_utils` or `dbt_date` macro is called with an argument that was renamed or removed in a package version upgrade
- 3A custom dispatch macro is defined for one adapter (e.g., Snowflake) but the project is running against a different adapter (e.g., BigQuery) with no fallback
- 4The `dispatch` list in dbt_project.yml points to a namespace that does not contain the macro being called
- 5A macro uses `adapter.dispatch()` with a macro name that has a typo or does not exist in the specified package
How to fix it
- 1Check the exact macro name and all argument names in the calling model or macro against the macro definition or package documentation.
- 2Run `dbt compile --select <model>` to surface the full traceback showing which macro call failed and what arguments were passed.
- 3If the error appeared after a package upgrade, check the package's CHANGELOG for breaking argument changes and update all call sites.
- 4Verify your `dispatch` config in dbt_project.yml — the namespace ordering determines which implementation is used for each adapter.
- 5Test the macro call in isolation with `dbt run-operation <macro_name> --args '{arg: value}'` before embedding it in a model.