Selecting all nodes but only tests for modified relations #12147
Unanswered
jeffkeller-einc
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a dbt project where creating the relations is fairly quick but running all tests is beginning to add significant time to my CI / CD pipeline. I'd like to streamline it by creating all relations but only running the tests on modified relations and their ancestors / descendants.
I know I can achieve this by sequencing dbt commands like this:
But I would really like to capture all of this in a single selector that I can pass to
dbt buildso that I can:dbt buildcommanddbt retryif neededI tried this:
dbt ls --exclude "state:unmodified,resource_type:test" --state ...But this excludes all tests. I think this is because all tests are considered nodes as well and while their parent model may have changed, they have not changed themselves and so are excluded.
Beta Was this translation helpful? Give feedback.
All reactions