From 0d8e16449ce27d7821bf329a95c73fb189c60fd2 Mon Sep 17 00:00:00 2001 From: Leo Miranda Date: Fri, 23 Jan 2026 16:33:02 +0000 Subject: [PATCH] Add "phase-4-dbt-test-syntax" --- phase-4-dbt-test-syntax.-.md | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 phase-4-dbt-test-syntax.-.md diff --git a/phase-4-dbt-test-syntax.-.md b/phase-4-dbt-test-syntax.-.md new file mode 100644 index 0000000..f2f3307 --- /dev/null +++ b/phase-4-dbt-test-syntax.-.md @@ -0,0 +1,40 @@ +# Phase 4 - dbt Test Syntax Deprecation + +**Date**: 2026-01-16 +**Tags**: dbt, testing, yaml, deprecation, syntax, schema + +--- + +## Context +Implementing dbt mart models with `accepted_values` tests for tier columns (safety_tier, income_quintile, amenity_tier) that should only contain values 1-5. + +## Problem +dbt 1.9+ introduced a deprecation warning for generic test arguments. The old syntax: + +```yaml +tests: + - accepted_values: + values: [1, 2, 3, 4, 5] +``` + +Produces deprecation warnings: +``` +MissingArgumentsPropertyInGenericTestDeprecation: Arguments to generic tests should be nested under the `arguments` property. +``` + +## Solution +Nest test arguments under the `arguments` property: + +```yaml +tests: + - accepted_values: + arguments: + values: [1, 2, 3, 4, 5] +``` + +This applies to all generic tests with arguments, not just `accepted_values`. + +## Prevention +- When writing dbt schema YAML files, always use the `arguments:` nesting for generic tests +- Run `dbt parse --no-partial-parse` to catch all deprecation warnings before they become errors +- Check dbt changelog when upgrading versions for breaking changes to test syntax