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

Eric Larson

06/15/2022, 9:48 PM
Hi is there a way to set the
group_name
on DBT assets when using
load_assets_from_dbt_project()
?
c

claire

06/15/2022, 10:11 PM
Hi Eric. Due to time constraints, this is something we weren't able to add before 0.15.0. It'll be coming soon though in the next couple weeks. For now, you can iterate through each asset returned from
load_assets_from_dbt_project
and do something like this:
Copy code
[asset.with_prefix_or_group(group_names_by_key={AssetKey("foo"): "group_name"}) for asset in load_assets_from_dbt_project()]
cc @owen for visibility
1
j

James Mead

09/08/2022, 3:46 PM
Hi @claire 👋 do you have an update on when this update might be released?
o

owen

09/08/2022, 3:56 PM
hi @James Mead! there's now a
node_info_to_group_fn
argument on that function. For example, if you want them all to have the same group name, you can do
load_assets_from_dbt_project(..., node_info_to_group_fn=lambda _: "mygroupname")
j

James Mead

09/08/2022, 4:11 PM
Amazing, that seems to have worked - thanks so much @owen!
🙌 1
7 Views