Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move data test "rendering" out of python compilation step #3154

Closed
kwigley opened this issue Mar 10, 2021 · 0 comments · Fixed by #3181
Closed

Move data test "rendering" out of python compilation step #3154

kwigley opened this issue Mar 10, 2021 · 0 comments · Fixed by #3181
Assignees
Labels
dbt tests Issues related to built-in dbt testing functionality
Milestone

Comments

@kwigley
Copy link
Contributor

kwigley commented Mar 10, 2021

Description

We currently wrap data tests with a CTE during the node compilation step
https://github.com/fishtown-analytics/dbt/blob/24e4b75c354e0f6bc5af7b51c4bb220428c84d5b/core/dbt/compilation.py#L362-L372
This ties our hands for desired changes to tests. We should be able to align data tests with how models are compiled using a test materialization. The goal of this issue is to maintain current implementation and reporting of data tests, but compile them similarly to models.

This will affect execution as well, since we execute the sql directly and simply return the amount of rows in the result.
https://github.com/fishtown-analytics/dbt/blob/24e4b75c354e0f6bc5af7b51c4bb220428c84d5b/core/dbt/task/test.py#L82-L83
We can use prior art of model execution to help here as well.

@kwigley kwigley added the dbt tests Issues related to built-in dbt testing functionality label Mar 10, 2021
@kwigley kwigley self-assigned this Mar 10, 2021
@jtcohen6 jtcohen6 added this to the Margaret Mead milestone Apr 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dbt tests Issues related to built-in dbt testing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants