How to trigger downstream dbt assets for multiple upstream multi_assets with is_required=False? #18667
-
Currently I have a standard dbt_assets definition and multiple upstream multi_assets with AssetOut(is_required=False). If I do a full refresh of upstream assets, then dbt_assets trigger as expected. In case if one or more assets of multi_asset don't yield their results, all of the downstream dbt assets would be skipped: What could be an approach to keep multi_assets with is_required=False flag and trigger downstream dbt assets as expected? UPD: I've tried to #ask-ai, but no luck yet |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 9 replies
-
@OwenKephart do you know if there's a way to do this? I think this may be a limitation of our current implementatin. |
Beta Was this translation helpful? Give feedback.
-
Also dealing with this issue, but not for DBT assets. Basically I have two multi_assets, an upstream and a downstream, and the upstream has is_required=false for each AssetOut, while the downstream has internal_asset_deps mapped appropriately. But because the downstream still requires every asset from the upstream multi_asset to have been materialized, I can never materialize just a subset of assets. I'm just going to use a factory pattern for now. |
Beta Was this translation helpful? Give feedback.
-
I also have hit an issue with skipping materialization, which may or may not be related. |
Beta Was this translation helpful? Give feedback.
-
We're tracking this feature request here now: #22242 |
Beta Was this translation helpful? Give feedback.
@TyShkan Unfortunately this is a limitation of the current implementation -- the core execution logic will never start a downstream step if any of the upstream steps did not return a result.
One potential workaround would be to split your single dbt_assets method into multiple (ideally separated by which assets they're downstream of, although depending on the shape of your graph this may not be possible). This way, if one upstream asset is skipped, only the dbt assets downstream of it would actually be materialized.