Skip to content

Commit

Permalink
Merge pull request #2 from portovep/contract-testing
Browse files Browse the repository at this point in the history
Add contract testing examples and CI/CD pipeline
  • Loading branch information
portovep authored Feb 13, 2024
2 parents a0b43f1 + b15a7bd commit 5c7d7d7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# dbt-testing-examples

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

- [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).
- [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).

Expand All @@ -13,7 +14,6 @@ This repository contains examples of how to implement real unit tests for a dbt
- Model contracts example with dbt 1.5
- CI/CD pipeline example with Github Actions


## Roadmap

- [x] ~Add unit test examples~
Expand All @@ -24,16 +24,17 @@ This repository contains examples of how to implement real unit tests for a dbt
- [ ] Add data quality test examples

## Sample dbt app

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.

![The layered architecture of a typical dbt data app](https://miro.medium.com/v2/resize:fit:2000/0*dvpk1nU-43Mz7nEn)

## Types of tests

The repository contains examples for both unit and component tests.

![The usual test pyramid for an operational app](https://miro.medium.com/v2/resize:fit:800/format:webp/1*I6-e27kPOuJ9QaIgR9OwXw.png)


## Katas

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:
Expand Down

0 comments on commit 5c7d7d7

Please sign in to comment.