|
1 |
| -# dbt-unit-testing-examples |
| 1 | +# dbt-testing-examples |
2 | 2 |
|
3 |
| -This repository contains examples of how to implement real unit tests for a dbt data application by using the [dbt-unit-testing](https://github.com/EqualExperts/dbt-unit-testing) package. |
| 3 | +This repository contains examples of how to implement real unit tests for a dbt data application by using the [dbt-unit-testing](https://github.com/EqualExperts/dbt-unit-testing) package. You can also check the articles I wrote on testing data pipelines and data products with dbt |
| 4 | + |
| 5 | +- [How to Improve The Code Quality of your Dbt Models with Unit Tests and TDD](https://medium.com/@pablo.porto/improving-the-code-quality-of-your-dbt-models-with-unit-tests-and-tdd-203ed0be791e). |
| 6 | +- [A Complete Guide to Effectively Scale your Data Pipelines and Data Products with Contract Testing and dbt](https://medium.com/towards-data-science/how-to-scale-your-data-pipelines-and-data-products-with-dbt-and-contract-testing-10c92ea9a443). |
| 7 | + |
| 8 | +## Features |
| 9 | + |
| 10 | +- Unit test and mocking examples with the dbt-unit-testing package |
| 11 | +- Katas to get started unit testing models |
| 12 | +- Component test examples with the dbt-unit-testing package |
| 13 | +- Sources contract test examples with the dbt-expectations package |
| 14 | +- Model contracts example with dbt 1.5 |
| 15 | +- CI/CD pipeline example with Github Actions |
| 16 | + |
| 17 | +## Roadmap |
| 18 | + |
| 19 | +- [x] ~Add unit test examples~ |
| 20 | +- [x] ~Add katas and improve README~ |
| 21 | +- [x] ~Add component test examples~ |
| 22 | +- [x] ~Add support for Github Codespaces~ |
| 23 | +- [x] ~Add contract test examples~ |
| 24 | +- [ ] Add data quality test examples |
| 25 | + |
| 26 | +## Sample dbt app |
| 27 | + |
| 28 | +Our sample dbt app is called health-insights. It takes weight and height data from upstream sources and calculates the metric body mass index. It follows the usual layered architecture commonly found in dbt projects. |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | +## Types of tests |
| 33 | + |
| 34 | +The repository contains examples for both unit and component tests. |
| 35 | + |
| 36 | + |
4 | 37 |
|
5 | 38 | ## Katas
|
6 | 39 |
|
7 |
| -The repo contains two katas (small exercises) to learn how to do unit testing of dbt models by practicing: |
| 40 | +The repo contains two katas (small exercises) to learn how to implement unit tests for dbt models with the [dbt-unit-testing](https://github.com/EqualExperts/dbt-unit-testing) package: |
8 | 41 |
|
9 | 42 | - [Kata 1 - Adding support for imperial units](exercises/kata1.md) ([Solution](exercises/kata1-solution.md))
|
10 | 43 | - [Kata 2 - Categorize body mass index (BMI) following WHO guidelines](exercises/kata1.md)
|
@@ -71,7 +104,7 @@ Contract tests
|
71 | 104 | dbt test --select tag:contract-test-source
|
72 | 105 | ```
|
73 | 106 |
|
74 |
| -## Running data quality tests |
| 107 | +## Running data quality tests (Coming soon) |
75 | 108 |
|
76 | 109 | ```
|
77 | 110 | dbt test --select tag:data-quality
|
|
0 commit comments