https://dagster.io/ logo
#ask-community
Title
# ask-community
d

Dimitris Stafylarakis

06/27/2022, 9:05 AM
Hello there! I’m using dagster with dbt and run into some issues, perhaps I can get some good tips here 😄. For context, I have a complex dbt project containing several models, some of them incremental as they model large amount of data. In order to manage the complexity and data size, I need to use the powerful selection/exclusion filters offered by the dbt cli, as well as override variables (e.g. to specify the partition). When using dagster, I see that the pre-defined ops of dagster-dbt (e.g.
dbt_run_op
) do not allow passing anything through to the raw command, With SDAs I can select models, however based on other questions on the subject, it seems like support for partitions is not there yet. It seems to me that at this point, the only possibility is to use the
dbt_cli_resource
directly and generate
AssetMaterializations
myself, is that correct?
c

chris

06/27/2022, 6:45 PM
Your intuition is correct - for now this is only possible using the
dbt_cli_resource
+
AssetMaterialization
. Supporting partitions + custom dbt commands is definitely something on the radar for the near future though: https://github.com/dagster-io/dagster/issues/7683
s

sandy

06/27/2022, 8:47 PM
Hey @Dimitris Stafylarakis - you can use the
dbt_cli_resource
alongside software-defined assets, so you shouldn't need to use `AssetMaterialization`s unless you need the partitioned job UI. But, as Chris pointed out, we're currently workin on adding that as well
d

Dimitris Stafylarakis

06/27/2022, 10:10 PM
thank you both! I managed to get things running after some hacking (looking forward to dbt + asset partitions :D). And a btw: If I try to define dependencies between graph-backed assets that belong to different groups, dagster sees circular dependencies somehow. When they’re in the same group, it works. Let me know if you think it’s a bug!
s

sandy

06/27/2022, 10:11 PM
awesome - would you be able to show code that produces the circular dependency issue you're encountering?
d

Dimitris Stafylarakis

06/27/2022, 10:19 PM
sure thing, not today though as it’s 🛏️ time 😄
3 Views