Joel Olazagasti
05/16/2023, 8:03 PMeager
automaterialization policy with DBT assets will kick off multiple jobs with overlapping assets? We're running into this after an overnight sync failure last night, and it's making reconciling the downstream changes difficult. Also, the policy is triggering on assets whose upstream ingestion dependencies are still running, is there a way to configure the policy such that it won't trigger if an active upstream job is active?owen
05/16/2023, 9:27 PMload_assets_from_dbt...
call, or are there multiple underlying multi-assets?
as for not triggering when the upstream ingestion dependencies are still running, this does make a good deal of sense. would you mind filing a github issue for that? in the meantime, one possible solution might be to use AutoMaterializePolicy.lazy()
, then apply a freshness policy with a maximum lag minutes of (e.g.) 1hr to the assets downstream of your ingestion assets, such that they will wait awhile before consuming the ingestion data.
This does mean that the downstream assets would still wait a similar amount of time even if all ingestion tasks had finished, so I do think you're right that the behavior of waiting for in-flight runs to complete ends up the cleanestJoel Olazagasti
05/16/2023, 9:47 PMowen
05/16/2023, 9:50 PMJoel Olazagasti
05/16/2023, 9:54 PM1.3+
so I hadn't considered the implications of that. Theoretically, if I didn't care what time a partitioned asset synced, I could forgo scheduling it at all? But yes, I'm loading in my asset defs with load_assets_from_package_module
and assigning the auto-materialize policy there, where the partitioned asset gets picked up as well. That was mostly out of convenience, but if I need to load in/assign the policy more granularly that's not an issue.owen
05/16/2023, 10:02 PMowen
05/16/2023, 10:04 PMJoel Olazagasti
05/16/2023, 10:10 PMowen
05/16/2023, 10:12 PMJoel Olazagasti
05/16/2023, 10:28 PMJoel Olazagasti
05/16/2023, 10:53 PMowen
05/16/2023, 11:25 PMA
was materialized, the logic correctly identified that all downstream assets should be materialized. On the next tick (~30 seconds later), something weird happened which caused the logic to kick off D
and E
, but it's really hard to determine exactly what that weird thing was without that observability UI (and looking through the code I can't see how that would be possible w/o at least some materialization occurring in between those two ticksowen
05/16/2023, 11:26 PMJoel Olazagasti
05/16/2023, 11:43 PMJoel Olazagasti
05/16/2023, 11:44 PM