4 Comments

First of all, good article, thank you.

Could you elaborate on the testing pyramid for dbt?

You mentioned writing unit tests for transformations (not sure what that is in dbt if not models) and integration tests for models. What do you call integration tests in this scenario? (dbt is pretty self contained)

Expand full comment

This is a great set of questions, Nikita!

What I mean is that you should test all of your data using data contracts.

Then you should have unit tests to check your macros and basic transformations.

Finally, you need integration tests to ensure your models align with the business logic.

In the context of dbt, integration tests tests are custom queries/data tests, that ensure you measure KPIs and define objects in the right way. I hope that makes more sense.

Expand full comment

This is gold!

Expand full comment

Thank you, Lucian!

Expand full comment