Emit per-statement OpenLineage events for BigQuery script jobs#69234
Emit per-statement OpenLineage events for BigQuery script jobs#69234nailo2c wants to merge 7 commits into
Conversation
kacpermuda
left a comment
There was a problem hiding this comment.
Left few comments, thanks for taking a look at this !
041fcc8 to
e80b41a
Compare
|
Thanks for the review! I believe this version is better than before :) |
kacpermuda
left a comment
There was a problem hiding this comment.
Looks good, thanks. One more important change around import error catching, no other blocking issues. Please try running this code with older OpenLineage provider version to make sure it works (this import). You can use breeze release-management prepare-provider-distributions command to generate google provider wheel and install it somewhere where you can test it.
|
Thanks for the suggestion. I built the Google provider wheel from this branch and installed it with |
…logic and ensure None values are correctly passed
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