Dbt custom generic test

From ubie-oss/dbt-data-privacy · View interactive version

Dbt custom generic test is an AI agent skill from the GitHub repository ubie-oss/dbt-data-privacy. Implement or refactor a dbt custom generic data test using this package’s patterns (test block, adapter.dispatch, BigQuery-only implementations, macro property YAML, integration_tests fixtures). Use when adding a new generic test, splitting test/query/validation macros, fixing undefined test_* macro

How to use this skill

Skill file

dbt custom generic data test (this repo)

When to use

When not to use

Workflow (short)

  1. Read the official guide: Writing custom generic data tests (standard args, YAML usage, documenting test_<name>).
  2. Open the detailed checklist: references/checklist.md.
  3. Mirror the k_anonymity layout under macros/generic_tests/<name>/ and integration fixtures under integration_tests/models/generic_tests/<name>/ unless there is a reason not to.
  4. Validate with make run-unit-tests; use make run-integration-tests when SQL execution or BigQuery behavior changes (see AGENTS.md).

This skill keeps SKILL.md short for discovery and puts procedural detail in references/checklist.md (progressive disclosure).

Canonical paths (examples)

| Concern | Example in repo |

|--------|-------------------|

| Generic test + bigquery__test_* (k-anonymity) | CODE1 |

| Generic test + bigquery__test_* (l-diversity) | CODE1 |

| Validation + query SQL | CODE0, CODE1 |

| Macro property docs | CODE0 (name: test_k_anonymity) |

| Integration fixture + qualified test | CODE0 (dbt_data_privacy.k_anonymity) |

| Macro unit test (name must not shadow generic test) | CODE0 |

| Macro unit test (l-diversity) | CODE0 |

Constraints specific to dbt-data-privacy

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.