You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To handle multiple dataset updates efficiently and avoid triggering a DAG for every small dataset update (like a tiny partition), you can implement a "batching" mechanism where the DAG waits for a group of dataset events before triggering. This way, you avoid redundant DAG runs and ensure the DAG only executes when enough meaningful updates have occurred.
The only mention on batching I can find in AIP-82 is under the Out of Scope section.
AIP-76 does not do batching, but works on a different level, separating individual events from triggering the actual downstream run. I do not know if it fits your use case; only you can decide.
Currently, we're using a pull-based mechanism and triggering dataset creation events via the REST API. However, if we want to trigger events only when there are enough accumulated, we have to maintain an external state, group the events, and then send the dataset creation request. It would be great to have this feature built-in as part of the existing functionality.
It is challenging to map data warehouse partitions to the dataset partitions mentioned in AIP-76. As a result, batching events for triggering DAG runs is not feasible in this context.
Activity
dirrao commentedon Sep 10, 2024
Hi @uranusjr,
could you provide your feedback on this feature request when you have a moment?
uranusjr commentedon Sep 11, 2024
Isn’t this basically the idea behind AIP-76?
dirrao commentedon Sep 17, 2024
Possibly related, but I'm not sure. Does that include batching the events?
dirrao commentedon Oct 2, 2024
The AIP-82 contains this functionality.
https://cwiki.apache.org/confluence/display/AIRFLOW/AIP-82+External+event+driven+scheduling+in+Airflow
uranusjr commentedon Oct 2, 2024
The only mention on batching I can find in AIP-82 is under the Out of Scope section.
AIP-76 does not do batching, but works on a different level, separating individual events from triggering the actual downstream run. I do not know if it fits your use case; only you can decide.
dirrao commentedon Oct 2, 2024
Currently, we're using a pull-based mechanism and triggering dataset creation events via the REST API. However, if we want to trigger events only when there are enough accumulated, we have to maintain an external state, group the events, and then send the dataset creation request. It would be great to have this feature built-in as part of the existing functionality.
dirrao commentedon Oct 2, 2024
It is challenging to map data warehouse partitions to the dataset partitions mentioned in AIP-76. As a result, batching events for triggering DAG runs is not feasible in this context.