Skip materialization of dbt assets based on condition #28068
Unanswered
kennycontreras
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
-
Hey all 👋
I have created a
@dbt_assets
from some selected dbt models using a manifest, let's call themX
,Y
,Z
.These are materialization models that will run three times a day.
My problem is, that some models should run based on specific conditions.
E.g.,
Y
model should be materialized only when UTC hour time is 5.I have no problem passing configs to the
@dbt_assets
created. The issue comes about overriding the--select
arg.I tried to do the following
dbt_args += ["--select", " ".join(selected_models)]
But this creates the
--select
flag twice.Probably
--exclude
will work, but I wanted to ask if there's a proper way/solution to override the--select
arg from@dbt_assets
or other suggestion that you may have to achieve this task.If you need more info. please just let me know.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions