Dennis Gera
04/14/2023, 7:41 PMload_assets_from_dbt_manifest
already separate my dbt models with custom schemas as separate assets?Tim Castillo
04/14/2023, 7:44 PMDennis Gera
04/14/2023, 8:44 PMload_assets_from_dbt_manifest
2. I want to create jobs using define_asset_job
where I can make select statements and exclude statements from the dbt loaded manifest asset. I was trying to do this via AssetSelection.groups and .keys but had different results compared to creating a specific asset using load_assets_from_dbt_manifest
where I could specify select and exclude statements.load_assets_from_dbt_manifest
, each one with different select and exclude statements, and then loading them to the repo definition. I’m not sure this is the best way to do thisTim Castillo
04/14/2023, 8:50 PMnode_info_to_asset_key
parameter on the load_assets_from_dbt_*
function.
If you'd like to organize the groups, there is also the node_info_to_group_fn
, then you map your models to the exact execution groups, and your Asset Selection will just be that entire group.
And finally, have you seen the docs on the asset selection syntax? If not, would this be helpful?Dennis Gera
04/14/2023, 8:53 PMnode_info_to_asset_key
and node_info_to_group_fn
arguments?Tim Castillo
04/14/2023, 9:03 PMnode_info_to_asset_key
returns an asset key, which can be built like these examples.
And node_info_to_group_fn
just expects a string back and it'll create/add it to the group.load_assets_from_dbt_project
that selects specific models. 😅 We'd like to avoid that pattern and we're working on the ergonomics to prevent it, but I think in your case, you shouldn't need to.Dennis Gera
04/14/2023, 9:08 PMAssetSelection.groups("my_group").upstream()
and AssetSelection.assets(*my_asset)
?
assuming my_group
and my_asset
represent the same thingTim Castillo
04/14/2023, 9:24 PMDennis Gera
04/14/2023, 9:36 PMTim Castillo
04/14/2023, 9:37 PMDennis Gera
04/14/2023, 10:26 PM