What problem does it solve?
Writing dbt unit tests by hand is slow and error-prone: you must enumerate every upstream ref and source, build type-correct mock data, and compute expected outputs for CASE/WHEN branches, JOINs, window functions, and NULL handling. This Skill automates that analysis and assembles complete, validated unit test YAML for any dbt model.
Core Features & Use Cases
- Automated test generation: Parses the dbt manifest to find all upstream dependencies, then generates complete unit test YAML with mock inputs and expected outputs via the dbt_unit_test_gen tool.
- Edge-case coverage: Enforces mock rows that exercise failure modes of every SQL construct — LEFT JOIN misses, division by zero, NULL handling in COALESCE, window function boundaries, and incremental merge keys.
- Incremental model testing: Tests both full-refresh and incremental code paths using is_incremental overrides and mocked
this table state.
- Use Case: A data engineer asks to "add unit tests to fct_orders". The Skill compiles the model, reads its SQL, generates tests covering happy path, NULL handling, and boundary values, runs
altimate-dbt test to validate, and writes the YAML to the project's schema file.
Quick Start
Ask the agent to generate unit tests for a specific dbt model, for example: generate unit tests for the fct_orders model covering NULL handling and edge cases.