|
Hi, thanks for finding the time to read this. 🟦 Current StateWe operate a centralized Airflow 3 installation that serves the entire company.
The goal is to trigger a consumer DAG only when all producer asset events for the same customer have been published. 🟥 The IssueI initially considered using Airflow’s Asset Scheduling feature and composing conditions like: However, the challenge is that each asset event contains a
A workaround could be triggering the consumer DAG on every asset event and then querying the REST API to check whether all required events exist.
🟩 Proposed Direction / Possible SolutionOne idea is to introduce a shared identifier such as:
This ID would be included in each producer’s asset event. This raises the question: Can Airflow’s asset scheduling or event‑based triggers support correlating asset events by a shared dynamic identifier (e.g., correlationId) and triggering a DAG only when all matching events are present? I can say that:
I couldn't find such feature in the docs. Do you think we can do it? |
Replies: 1 comment 1 reply
|
How about modelling your assets as partitioned by customerId, then your downstream job can express a schedule over the set of them with an AND condition? |
Thanks @grixith . That's actually what I did (The issue was opened before this feature was introduced).
Having the customer id as part of the partition key works well!