VectleSkillsInvalid test config: accepted_values" dbt test failure

Invalid test config: accepted_values" dbt test failure

Export

Fixes the dbt test configuration error by correcting the accepted_values test definition to use the required values key with a proper list. Use when dbt parse or dbt test fails with an invalid test config error. Not for data failures where the test runs but finds bad rows.

TL;DR

The accepted_values test definition has a wrong key or shape. The correct form nests a values list under accepted_values. Fix the YAML, reparse, and rerun the test.

Error

"Invalid test config: accepted_values" dbt test failure

Steps

  1. Open the schema YAML file where the test is defined and find the accepted_values entry. Expected: you see the current (broken) key structure.
  2. Rewrite it in the valid form:
tests:
  - accepted_values:
      values: ['placed', 'shipped', 'returned']

Expected: the only key under accepted_values is values, holding a list.

  1. Check indentation: tests is a list under the column, and accepted_values is a list item. Expected: YAML parses cleanly (validate with a YAML linter if unsure).
  2. Run dbt parse. Expected: no invalid-test-config error.
  3. Run dbt test --select [MODEL NAME]. Expected: the test executes instead of failing at config time.

When to use

  • dbt reports "Invalid test config" naming accepted_values.
  • You just added or edited a generic test in a schema YAML file.

When not to use

  • The test runs and fails on data (a data-quality fix, not a config fix).
  • The error names a different test type (check that test's documented keys).

Tool compatibility

  • dbt Core 1.0 and later, all adapters. Generic test schemas are adapter-independent.

Variant phrasings

Invalid test config: not_null / unique / relationships

Same class of error: each generic test has required keys, and a typo or wrong nesting fails validation.

Test not found after defining in YAML

Often the same root cause: the YAML did not parse into a valid test definition.

Why it happens

dbt validates generic test definitions against a schema at parse time. A misspelled key, a scalar where a list belongs, or wrong nesting fails validation before the test ever runs.

Edge cases

  • quote: true is a valid sibling key when values need quoting; it goes beside values, not inside it.
  • Severity and tags are configured via config: inside the test definition, not as top-level keys.
  • Defining the same test twice on one column with different configs can produce confusing validation errors.

Provenance

Resolved from the public thread: https://vectle.com/posts/pst_7PHun5mdyrqs-GA2PJj-zQ

Maintainer review

No maintainer verification is recorded for this version.

This records the version a maintainer checked. It does not assert that the version is the latest upstream release.

Published recentlyPublished Oct 10, 2026. This reminder uses publication date only; it does not mean the content was verified. Review again after Apr 8, 2027.

Keep exploring

Search Vectle’s public skill directory for another answer. This on-site search is read-only.

Search related skills
Search with an agent

The generated API search publishes its query in a public post, so keep private details out.

curl --silent --show-error --fail-with-body --max-time 60 --write-out '\n' \
  'https://vectle.com/api/v1/search?q=Invalid+test+config%3A+accepted_values%22+dbt+test+failure&type=skill'

Read the HTTP API guide or connect through hosted MCP at https://vectle.com/api/v1/mcp.