feat: Add JobDependenciesRunFacet to asset-triggered OL DAG events#59521
Merged
Conversation
6f450b1 to
d413959
Compare
a880546 to
dc5ca00
Compare
dc5ca00 to
f776412
Compare
c5b06bf to
5c33850
Compare
5c33850 to
a7a87bb
Compare
uranusjr
approved these changes
Jan 9, 2026
mobuchowski
approved these changes
Jan 9, 2026
jason810496
pushed a commit
to jason810496/airflow
that referenced
this pull request
Jan 22, 2026
jhgoebbert
pushed a commit
to jhgoebbert/airflow_Owen-CH-Leung
that referenced
this pull request
Feb 8, 2026
choo121600
pushed a commit
to choo121600/airflow
that referenced
this pull request
Feb 22, 2026
Subham-KRLX
pushed a commit
to Subham-KRLX/airflow
that referenced
this pull request
Mar 4, 2026
Ankurdeewan
pushed a commit
to Ankurdeewan/airflow
that referenced
this pull request
Mar 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When DagRun is triggered by Asset Events, OL has no visibility into what were the emitting jobs. This PR adds JobDependenciesRunFacet to DAG events, with information about this connection. Now OL consumers will be able to track exactly from which runs the asset events are coming from, improving RCA dramatically.
So when DAG A is scheduled on 2 Assets: ASSET1 and ASSET2, when those two asset are produced by tasks in other dags, the OL DAG event for DAG A, will have the information what were the Asset Events consumed by this dagrun, and from which exact task runs and dagruns of other DAGs they came from (with OL run id of those task runs that produced assets as well !).
I've also added a possibility to create a JobDependency from AssetEvent.extra, so that users who emit Asset Events manually via the API can also attach OpenLineage job information that will be included in the facet.
Example 1:
In that scenario, we have two dags that are correlated together through an Asset. Currently Ol even have information about dag schedule and about task outlets, but that's all it has - no information about actual run correlation, only job level.
After this PR, the DAG events for
dag_asset_consumer2, would contain a facet like:So we have a clear information about the dependency between jobs, OL job / run identifiers and even some metadata about the AssetEvents consumed with Airflow specific information like DagRunID.
Example 2:
I think the real power of this features shows up when dag gets triggered on multiple assets, usually coming from dags running on different schedules. This is an example produced by the below code.
I've run the first asset producer twice, and it wasn't enough to trigger the consumer that also requires second asset. After running second asset producer, we can see the information about all consumed assets and respective OL job/run information for all 3 runs.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.