EqualExperts/dbt-unit-testing
View on GitHub ↗ ★ 448 Shell
This dbt package contains macros to support unit testing that can be (re)used across dbt projects.
4 mentions on Hacker News by 3 people: 0 stories, 4 comments · first 2022-12-05 · latest 2023-01-31
20082026
-
We use this and take an example-based tests approach for any non-trivial DBT models: https://github.com/EqualExperts/dbt-unit-testing More trivial example: {% call dbt_unit_testing.test( 'REDACTED', 'Should replace nullish values with…
comment by epgui · 2023-01-31 · in Ask HN: How do you test SQL? -
…an 'ephemeral model' to different model file 2. Mock out this model in upstream model in unit tests https://github.com/EqualExperts/dbt-unit-testing 3. Write unit tests for this model. This is not different than regular software…
comment by dangwhy · 2023-01-30 · in SQL should be the default choice for data transformation logic -
…might work but it rarely ever works in that way. I found that to be more true for CSV tests for sql https://github.com/EqualExperts/dbt-unit-testing#different-w... because they are always in the same format , input csv -> output csv I am…
comment by mythhouse · 2022-12-05 · in Modern data modeling: Start with the end? -
…this possible with refs that can be swapped out with mocks. This is the awesome library I am using https://github.com/EqualExperts/dbt-unit-testing
comment by mythhouse · 2022-12-05 · in Modern data modeling: Start with the end?