Testing doesn’t have to be trial and error. Get ahead of common pitfalls with this step-by-step guide to avoid common mistakes and improve your workflow.
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)
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.
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)
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.
This is gold!
Thank you, Lucian!