dbt Unit Test Generator
Generates standardized dbt unit test YAML definitions to validate SQL transformation logic using mocked inputs and expected outputs.
This skill streamlines the implementation of test-driven development (TDD) within dbt projects by helping developers create robust unit tests. It automates the generation of the Model-Input-Output (MIO) pattern, allowing users to mock upstream dependencies like sources, seeds, and models without requiring actual warehouse data. By facilitating the validation of complex SQL logic—such as window functions, regex, and intricate joins—before materialization, it ensures high data quality and prevents regressions in production environments.
Key Features
01Mocks upstream dependencies including refs, sources, and seeds.
02Supports multiple data formats including YAML dict, CSV, and SQL queries.
03Generates comprehensive unit test YAML structures for dbt models.
04Provides warehouse-specific guidance for BigQuery, Snowflake, Postgres, and Spark.
05Handles specialized scenarios like incremental models and ephemeral dependencies.
06304 GitHub stars
Use Cases
01Validating complex SQL transformations involving window functions or date math.
02Creating regression tests to ensure bug fixes remain effective over time.
03Implementing test-driven development (TDD) for new dbt models.