Default grouping for dbt sources #21626
-
I upgraded to dagster==1.7.3 and dagster-dbt==0.23.3 and am now seeing my dbt sources grouped under the default asset group in the UI. The version I was on previously, dagster==1.5.13 and dagster-dbt==0.21.13, did not show my sources in the asset group section. I've tried adding necessary meta tags to the nodes themselves in the sources.yml file and to the dbt_project.yml file to group them, but its not working. How do I group my dbt sources so they aren't grouped under default? I'm using dbt-core==1.7.13. The dagster meta key does group my models correctly, but not my sources. Here's a snippet of my dbt_project.yml file:
Here's a snippet a sources.yml file:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
A previous discussion answers this question. #16470 (comment) For example, to automatically create def build_dbt_sources(manifest: Mapping[str, Any], dagster_dbt_translator: DagsterDbtTranslator) -> Sequence[SourceAsset]:
return [
SourceAsset(
key=dagster_dbt_translator.get_asset_key(dbt_resource_props),
group_name=dagster_dbt_translator.get_group_name(dbt_resource_props)
)
for dbt_resource_props in manifest["sources"].values()
] |
Beta Was this translation helpful? Give feedback.
A previous discussion answers this question. #16470 (comment)
For example, to automatically create
SourceAsset
's for all of your dbt sources, you could do something like: