Emit per-statement OpenLineage events for BigQuery script jobs#69234
Open
nailo2c wants to merge 3 commits into
Open
Emit per-statement OpenLineage events for BigQuery script jobs#69234nailo2c wants to merge 3 commits into
nailo2c wants to merge 3 commits into
Conversation
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.
closes: #47579
Summary
BigQueryInsertJobOperatorrunning a stored procedure / multi-statement query produced a single task event whose inputs and outputs were the aggregation of all child query jobs, so dataset-level lineage looked like every input fed every output.This adds a separate OpenLineage QUERY event per BigQuery child job, giving accurate per-statement lineage.
input_table1->query.1->output_table1Before
One COMPLETE event, child datasets flattened together, looks many-to-many:
{"eventType": "COMPLETE", "job": {"name": "...call_stored_procedure"}, "inputs": ["...input_table1", "...input_table2"], "outputs": ["...output_table1", "...output_table2"]} // i1,i2 -> o1,o2 (misleading)After
The task event is unchanged (still the coarse, task-level summary, backward compatible), and each child query is additionally emitted as its own event with precise
input -> outputand aparentfacet linking back to the task:Test Dag I Used
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Opus 4.8 following the guidelines