Skip to content

feat(cli): emit lineage for assertions and property graphs - #2368

Merged
rafal-hawrylak merged 1 commit into
mainfrom
feat-cli-lineage-assertions
Oct 13, 2026
Merged

rafal-hawrylak merged 1 commit into
mainfrom
feat-cli-lineage-assertions

Conversation

@rafal-hawrylak

@rafal-hawrylak rafal-hawrylak commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

feat(cli): emit lineage for assertions and property graphs and align actionType with Backend

Every action that runs a BigQuery job now emits lineage events. This covers tables, operations, assertions and property graphs. Declarations are still skipped.

The gcp_bq_pipelines_job.actionType attribute now uses the same uppercase enum values as Dataform in Google Cloud: TABLE, OPERATIONS, ASSERTION and PROPERTY_GRAPH (replacing the previous lowercase table and operation values to match what Knowledge Catalog Lineage expects).

For assertions the externalQuery facet references the CREATE VIEW job that writes the assertion view instead of the row count check query, and the assertion's dependencies are reported as inputs. For property graphs the inputs are populated from dependencyTargets.

…actionType with Backend

Every action that runs a BigQuery job now emits lineage events. This covers
tables, operations, assertions and property graphs. Declarations are still
skipped.

The gcp_bq_pipelines_job.actionType attribute now uses the same values as
Dataform in Google Cloud: TABLE, OPERATIONS, ASSERTION and PROPERTY_GRAPH.

For assertions the externalQuery facet references the CREATE VIEW job that
writes the assertion view instead of the row count check query.
@rafal-hawrylak
rafal-hawrylak requested a review from a team as a code owner October 13, 2026 11:25

@apilaskowski apilaskowski left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM assuming review comments are resolved

Comment thread cli/api/lineage/payload_builder.ts Resolved
Comment thread cli/api/lineage/payload_builder.ts Resolved
Comment thread cli/api/lineage/payload_builder.ts Resolved
Comment thread cli/api/lineage/action_type.ts Resolved
Comment thread cli/api/lineage/action_type.ts Resolved
Comment thread cli/api/lineage/action_type.ts Resolved
Comment thread cli/api/lineage/action_type.ts Resolved
Comment thread cli/README.md Resolved
@rafal-hawrylak
rafal-hawrylak merged commit 71f0014 into main Oct 13, 2026
14 checks passed
@rafal-hawrylak
rafal-hawrylak deleted the feat-cli-lineage-assertions branch October 13, 2026 20:29
@rafal-hawrylak

Copy link
Copy Markdown
Collaborator Author

All the comments will be addressed in the follow up PR - #2373

rafal-hawrylak added a commit that referenced this pull request Oct 14, 2026
Follow-up to #2368:
- Switch LINEAGE_ACTION_TYPES to ReadonlyMap and simplify isLineageEligibleAction
- Replace internal doc reference in action_type.ts with inline Cloud Dataform enum values
- Throw in LineagePayloadBuilder.build when called with an unsupported action type and test that LineageEmitter catches build errors
- Clarify extractTargetWritingBqJobId docstring with Runner.executeAction and ExecutionSql.publishTasks references
- Add end-to-end Runner test coverage for assertion externalQuery job ID selection
- Clarify in cli/README.md that assertion dependencies and property graph ref dependencies are reported as inputs
rafal-hawrylak added a commit that referenced this pull request Oct 14, 2026
Follow-up to #2368:
- Switch LINEAGE_ACTION_TYPES to ReadonlyMap and simplify isLineageEligibleAction
- Replace internal doc reference in action_type.ts with inline Cloud Dataform enum values
- Throw in LineagePayloadBuilder.build when called with an unsupported action type and test that LineageEmitter catches build errors
- Clarify extractTargetWritingBqJobId docstring with Runner.executeAction and ExecutionSql.publishTasks references
- Add end-to-end Runner test coverage for assertion externalQuery job ID selection
- Clarify in cli/README.md that assertion dependencies and property graph ref dependencies are reported as inputs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants