MetricSign
EN|NLRequest Access
Medium severitycompilation

Power BI Refresh Error:
DbtGenericTestArgumentError

What does this error mean?

A dbt generic test definition in a schema.yml or sources.yml file passes an invalid or unexpected argument to the test macro, causing a compilation error.

Common causes

  • 1A required argument for the test macro is missing from the test definition
  • 2An argument name contains a typo or uses the wrong naming convention (snake_case vs camelCase)
  • 3The test was upgraded in a package version that changed its argument signature
  • 4Extra unrecognized arguments were passed to a built-in dbt test that does not accept keyword arguments

How to fix it

  1. 1Step 1: Identify the failing test name and the column/model it is applied to from the dbt compile output.
  2. 2Step 2: Review the test macro signature in the dbt documentation or package source to confirm required and optional arguments.
  3. 3Step 3: Update the test definition in the relevant schema.yml or sources.yml to match the correct argument names and values.
  4. 4Step 4: Run dbt compile to verify the fix before running dbt test.
  5. 5Step 5: After a package upgrade, review the package changelog for test argument changes.

Frequently asked questions

How do I find the correct arguments for a dbt-utils generic test?

Check the dbt-utils documentation or the macro source in the installed package at dbt_packages/dbt_utils/macros/generic_tests/. Each test macro lists its arguments in the signature.

Can I pass extra custom arguments to built-in dbt tests?

No — built-in tests like not_null, unique, accepted_values, and relationships only accept their documented arguments. Use custom generic tests if you need additional parameters.

Other compilation errors