Hi is there a way to set the `group_name` on DBT a...
# ask-community
e
Hi is there a way to set the
group_name
on DBT assets when using
load_assets_from_dbt_project()
?
c
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
Hi @claire 👋 do you have an update on when this update might be released?
o
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
Amazing, that seems to have worked - thanks so much @owen!
🙌 1