You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(ontology): add --skip-property-graph for user-owned graph DDL (#104)
Lets users with their own CREATE PROPERTY GRAPH DDL — managed by
Terraform, dbt, or hand-authored — populate base tables from BQ AA
traces without overwriting the graph object on every run.
Changes
- ontology_orchestrator.build_ontology_graph gains
skip_property_graph: bool = False. When True, phase 5 is not
invoked: no OntologyPropertyGraphCompiler is constructed, no
CREATE OR REPLACE PROPERTY GRAPH runs.
- Result dict gains property_graph_status with values "created" /
"failed" / "skipped:user_requested", plus skipped_reason
("user_requested") when phase 5 was skipped.
- ontology-build CLI gains --skip-property-graph and threads
property_graph_status through to the curated output dict so JSON
consumers can distinguish "skipped" from "failed" without parsing
stderr.
- Exit handling: skipped_reason == "user_requested" exits 0 silently;
the existing exit-1-with-error behavior is preserved for actual
graph-creation failures.
Tests
- test_skip_property_graph_does_not_construct_compiler asserts the
compiler class is never called (mock.assert_not_called) when the
flag is set.
- test_property_graph_status_created_on_success and
test_property_graph_status_failed_on_compiler_false cover the two
default-mode status values.
- CLI tests cover exit 0 with status="skipped:user_requested",
default skip_property_graph=False threading, and exit 1 with
status="failed" on actual creation failure.
135/135 tests in test_ontology_orchestrator.py + test_cli.py pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments