Skip to content

Commit b15a7bd

Browse files
committed
Merge branch 'main' into contract-testing
2 parents 79f2c84 + a0b43f1 commit b15a7bd

File tree

1 file changed

+37
-4
lines changed

1 file changed

+37
-4
lines changed

README.md

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,43 @@
1-
# dbt-unit-testing-examples
1+
# dbt-testing-examples
22

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+
![The layered architecture of a typical dbt data app](https://miro.medium.com/v2/resize:fit:2000/0*dvpk1nU-43Mz7nEn)
31+
32+
## Types of tests
33+
34+
The repository contains examples for both unit and component tests.
35+
36+
![The usual test pyramid for an operational app](https://miro.medium.com/v2/resize:fit:800/format:webp/1*I6-e27kPOuJ9QaIgR9OwXw.png)
437

538
## Katas
639

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:
841

942
- [Kata 1 - Adding support for imperial units](exercises/kata1.md) ([Solution](exercises/kata1-solution.md))
1043
- [Kata 2 - Categorize body mass index (BMI) following WHO guidelines](exercises/kata1.md)
@@ -71,7 +104,7 @@ Contract tests
71104
dbt test --select tag:contract-test-source
72105
```
73106

74-
## Running data quality tests
107+
## Running data quality tests (Coming soon)
75108

76109
```
77110
dbt test --select tag:data-quality

0 commit comments

Comments
 (0)