https://dagster.io/ logo
#integration-dbt
Title
# integration-dbt
j

jasono

08/09/2023, 5:20 AM
Hi, I have two
dbt_assets
block defined as follows where they represent two groups of dbt models with the first set of models being the dependency of the second set. (in other words, the first models are referenced by the 2nd set of models) The lineage graph shows the connector between the two sets (as I would expect), but when I "material all" with both boxes selected in dagit only the first set ("dbt_upstreaam_assets") gets executed, not the 2nd ("dbt_downstream_assets"). Is this behavior by design?
Copy code
@dbt_assets(select="upstream_model1 updstream_model2",
    partitions_def=monthly_partitions)
def dbt_upstream_assets(context ...)
  yield from _process_partitioned_dbt_assets(context= ...

@dbt_assets(select="downstream_model1, downstream_model2",
    partitions_def=monthly_partitions)
def dbt_downstream_assets(context ..., upstream_model1, updstream_model2)
  yield from _process_partitioned_dbt_assets(context= ...
r

rex

08/10/2023, 6:33 PM
I don’t believe you need to specify
upstream_model1
and
upstream_model2
here? What does your asset graph look like in this scenario?
Copy code
@dbt_assets(select="upstream_model1 updstream_model2",
    partitions_def=monthly_partitions)
def dbt_upstream_assets(context ...)
  yield from _process_partitioned_dbt_assets(context= ...

@dbt_assets(select="downstream_model1, downstream_model2",
    partitions_def=monthly_partitions)
def dbt_downstream_assets(context ...)
  yield from _process_partitioned_dbt_assets(context= ...
I believe I understand the problem that you’re experiencing, but having a screenshot of the behavior you’re seeing in Dagster UI would help confirm.