Medium severityconfiguration
Power BI Refresh Error:
dbt Built-in Test Override Error
What does this error mean?
A custom generic test in the project or a package has the same name as a dbt built-in test (not_null, unique, accepted_values, relationships). dbt may use the wrong test definition, producing incorrect behaviour or a compilation error.
Common causes
- 1A macro file in `macros/` defines `test_not_null`, `test_unique`, etc., overriding the dbt built-in
- 2An installed dbt package defines a generic test with the same name as a built-in
- 3Team member created a custom test thinking it would augment rather than replace the built-in
- 4Renaming a package test file introduced a name collision with a built-in
How to fix it
- 1Search for conflicting macro names: `grep -r 'macro test_not_null\|macro test_unique\|macro test_accepted_values\|macro test_relationships' macros/`
- 2Rename the conflicting custom test macro to avoid the built-in namespace
- 3Run `dbt debug` and `dbt compile` to verify the correct test macro is being resolved
- 4Use `--debug` to see macro dispatch logs confirming which macro version is being used
- 5If the override is intentional (replacing a built-in), document it clearly and ensure the replacement handles all the same edge cases