dbt custom generic data test (this repo)
SkillDatabases & dataImplement 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_* macros from a package, or aligning with dbt’s generic test docs.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the dbt custom generic data test (this repo) skill
What this skill tells your AI
The instructions your AI receives, as published by ubie-oss/dbt-data-privacy in .claude/skills/dbt-custom-generic-test/SKILL.md and read by ahel’s review.
When to use
- Adding or changing a custom generic data test (
{% test my_test(model, column_name, ...) %}). - Wiring adapter.dispatch for warehouse-specific SQL (here: BigQuery).
- Adding macro schema docs (
macros:/test_<name>) or an integration_tests model +data_tests. - Debugging
test_<name>is undefined or shadowing between the package andintegration_tests.
When not to use
- Singular (data) tests in
tests/that are not reusable generic tests—use normal dbt test guidance. - Warehouse features unrelated to test macro structure.
Workflow (short)
- Read the official guide: Writing custom generic data tests (standard args, YAML usage, documenting
test_<name>). - Open the detailed checklist: references/checklist.md.
- Mirror the k_anonymity layout under
macros/generic_tests/<name>/and integration fixtures underintegration_tests/models/generic_tests/<name>/unless there is a reason not to. - Validate with
make run-unit-tests; usemake run-integration-testswhen SQL execution or BigQuery behavior changes (seeAGENTS.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) | macros/generic_tests/k_anonymity/k_anonymity.sql |
Generic test + bigquery__test_* (l-diversity) | macros/generic_tests/l_diversity/l_diversity.sql |
| Validation + query SQL | k_anonymity_validate_arguments.sql, k_anonymity_query_sql_impl.sql |
| Macro property docs | k_anonymity.yml (name: test_k_anonymity) |
| Integration fixture + qualified test | schema.yml (dbt_data_privacy.k_anonymity) |
| Macro unit test (name must not shadow generic test) | test_k_anonymity.sql |
| Macro unit test (l-diversity) | test_l_diversity.sql |
Constraints specific to dbt-data-privacy
- BigQuery only for new generic tests unless the maintainers expand adapters.
- Prefer minimal behavior changes; keep existing tests green.
- Do not use Jinja delimiters inside macro property YAML
descriptionfields (dbt compiles those files as Jinja).
Signals
- GitHub stars
- 22
- Forks
- 2
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
dbt-custom-generic-test- Source
- github.com/ubie-oss/dbt-data-privacy