Add PropertyGraph action class - #2246
Merged
Merged
Conversation
Introduces core/actions/property_graph.ts implementing the PropertyGraph action for BigQuery Property Graph DDL generation. The class parses PropertyGraphConfig, applies normalization (scalar keys, string field shorthand, joinKeys array shorthand, default label synthesis, wildcard expansion), validates cross-entity references and emits the NODE TABLES / EDGE TABLES graph body. Catalog-based data sources (BigLake/Iceberg 4-part references) are parsed but rejected at compile time until project-wide 4-part Target support lands. Adds 26 direct-instantiation unit tests covering happy path, edge cases and error paths. Remaining tests requiring session-registered actions and runMainInVm are deferred. Files: - core/actions/property_graph.ts (new) - core/actions/property_graph_test.ts (new) - core/BUILD
kolina
approved these changes
Aug 18, 2026
| } | ||
|
|
||
| function parseTablePath(path: string, where: string): dataform.Target { | ||
| const parts = path.split("."); |
Contributor
There was a problem hiding this comment.
I suspect it's more complicated
for example my-project.my_dataset.table.view` may be a valid identifier
Collaborator
Author
There was a problem hiding this comment.
Not clear what do you mean. Is it about backtick?
Is this the value you say is valid: my-project.my_dataset.table.view` ?
Or this one: my-project.my_dataset.table.view ?
rafal-hawrylak
added a commit
that referenced
this pull request
Aug 19, 2026
- Drop duplicate arity check in buildEndpoint. The post-defaults check in validateEndpointReferences catches the same case with a clearer message. - Compare whole compiled objects in the minimal and relationship tests including the full graphBody string.
apilaskowski
pushed a commit
that referenced
this pull request
Aug 19, 2026
rafal-hawrylak
added a commit
that referenced
this pull request
Aug 19, 2026
Builds on top of #2246 (PropertyGraph action class) and #2249 (review follow-up). The class parsed and rendered a graph body but was not yet loaded from user projects or exposed to downstream code. - Session loading: main.ts finds `graph.yaml` files under `definitions/` and registers a PropertyGraph action per file. At most one graph.yaml is accepted per project. - Action index: actions/index.ts and session.ts expose PropertyGraph so downstream code treats it like tables and operations. - Emitter extensions: description and synonyms on both entities and relationships, fieldWildcard normalization for `fields: { importAll: true, except: [...] }`, and an OPTIONS clause on the graph carrying the graph description. - Proto: adds `is_default` to GraphLabel for the label wiring above. - Coverage: property_graph_test.ts grows for the new normalization and emitter behavior, and main_test.ts adds session-level tests plus a propertyGraph case in the shared test-helper switch. Older `dataformCoreVersion` values silently skip PropertyGraph files so projects pinning an earlier core do not break at load time.
rafal-hawrylak
added a commit
that referenced
this pull request
Aug 20, 2026
Builds on top of #2246 (PropertyGraph action class) and #2249 (review follow-up). The class parsed and rendered a graph body but was not yet loaded from user projects or exposed to downstream code. - Session loading: main.ts finds `graph.yaml` files under `definitions/` and registers a PropertyGraph action per file. At most one graph.yaml is accepted per project. - Action index: actions/index.ts and session.ts expose PropertyGraph so downstream code treats it like tables and operations. - Emitter extensions: description and synonyms on both entities and relationships, fieldWildcard normalization for `fields: { importAll: true, except: [...] }`, and an OPTIONS clause on the graph carrying the graph description. - Proto: adds `is_default` to GraphLabel for the label wiring above. - Coverage: property_graph_test.ts grows for the new normalization and emitter behavior, and main_test.ts adds session-level tests plus a propertyGraph case in the shared test-helper switch. Older `dataformCoreVersion` values silently skip PropertyGraph files so projects pinning an earlier core do not break at load time.
rafal-hawrylak
added a commit
that referenced
this pull request
Aug 20, 2026
Builds on top of #2246 (PropertyGraph action class) and #2249 (review follow-up). The class parsed and rendered a graph body but was not yet loaded from user projects or exposed to downstream code. - Session loading: main.ts finds `graph.yaml` files under `definitions/` and registers a PropertyGraph action per file. At most one graph.yaml is accepted per project. - Action index: actions/index.ts and session.ts expose PropertyGraph so downstream code treats it like tables and operations. - Emitter extensions: description and synonyms on both entities and relationships, fieldWildcard normalization for `fields: { importAll: true, except: [...] }`, and an OPTIONS clause on the graph carrying the graph description. - Proto: adds `is_default` to GraphLabel for the label wiring above. - Coverage: property_graph_test.ts grows for the new normalization and emitter behavior, and main_test.ts adds session-level tests plus a propertyGraph case in the shared test-helper switch. Older `dataformCoreVersion` values silently skip PropertyGraph files so projects pinning an earlier core do not break at load time.
rafal-hawrylak
added a commit
that referenced
this pull request
Aug 20, 2026
Builds on top of #2246 (PropertyGraph action class) and #2249 (review follow-up). The class parsed and rendered a graph body but was not yet loaded from user projects or exposed to downstream code. - Session loading: main.ts finds `graph.yaml` files under `definitions/` and registers a PropertyGraph action per file. At most one graph.yaml is accepted per project. - Action index: actions/index.ts and session.ts expose PropertyGraph so downstream code treats it like tables and operations. - Emitter extensions: description and synonyms on both entities and relationships, fieldWildcard normalization for `fields: { importAll: true, except: [...] }`, and an OPTIONS clause on the graph carrying the graph description. - Proto: adds `is_default` to GraphLabel for the label wiring above. - Coverage: property_graph_test.ts grows for the new normalization and emitter behavior, and main_test.ts adds session-level tests plus a propertyGraph case in the shared test-helper switch. Older `dataformCoreVersion` values silently skip PropertyGraph files so projects pinning an earlier core do not break at load time.
rafal-hawrylak
added a commit
that referenced
this pull request
Aug 21, 2026
Builds on top of #2246 (PropertyGraph action class) and #2249 (review follow-up). The class parsed and rendered a graph body but was not yet loaded from user projects or exposed to downstream code. - Session loading: main.ts finds `graph.yaml` files under `definitions/` and registers a PropertyGraph action per file. At most one graph.yaml is accepted per project. - Action index: actions/index.ts and session.ts expose PropertyGraph so downstream code treats it like tables and operations. - Emitter extensions: description and synonyms on both entities and relationships, fieldWildcard normalization for `fields: { importAll: true, except: [...] }`, and an OPTIONS clause on the graph carrying the graph description. - Proto: adds `is_default` to GraphLabel for the label wiring above. - Coverage: property_graph_test.ts grows for the new normalization and emitter behavior, and main_test.ts adds session-level tests plus a propertyGraph case in the shared test-helper switch. Older `dataformCoreVersion` values silently skip PropertyGraph files so projects pinning an earlier core do not break at load time.
rafal-hawrylak
added a commit
that referenced
this pull request
Aug 21, 2026
Builds on top of #2246 (PropertyGraph action class) and #2249 (review follow-up). The class parsed and rendered a graph body but was not yet loaded from user projects or exposed to downstream code. - Session loading: main.ts finds `graph.yaml` files under `definitions/` and registers a PropertyGraph action per file. At most one graph.yaml is accepted per project. - Action index: actions/index.ts and session.ts expose PropertyGraph so downstream code treats it like tables and operations. - Emitter extensions: description and synonyms on both entities and relationships, fieldWildcard normalization for `fields: { importAll: true, except: [...] }`, and an OPTIONS clause on the graph carrying the graph description. - Proto: adds `is_default` to GraphLabel for the label wiring above. - Coverage: property_graph_test.ts grows for the new normalization and emitter behavior, and main_test.ts adds session-level tests plus a propertyGraph case in the shared test-helper switch. Older `dataformCoreVersion` values silently skip PropertyGraph files so projects pinning an earlier core do not break at load time.
rafal-hawrylak
added a commit
that referenced
this pull request
Aug 24, 2026
Introduces core/actions/property_graph.ts implementing the PropertyGraph action for BigQuery Property Graph DDL generation. The class parses PropertyGraphConfig, applies normalization (scalar keys, string field shorthand, joinKeys array shorthand, default label synthesis, wildcard expansion), validates cross-entity references and emits the NODE TABLES / EDGE TABLES graph body. Catalog-based data sources (BigLake/Iceberg 4-part references) are parsed but rejected at compile time until project-wide 4-part Target support lands. Adds 26 direct-instantiation unit tests covering happy path, edge cases and error paths. Remaining tests requiring session-registered actions and runMainInVm are deferred. Files: - core/actions/property_graph.ts (new) - core/actions/property_graph_test.ts (new) - core/BUILD Porting the changes from PR (#2246)
rafal-hawrylak
added a commit
that referenced
this pull request
Aug 24, 2026
Builds on top of #2246 (PropertyGraph action class) and #2249 (review follow-up). The class parsed and rendered a graph body but was not yet loaded from user projects or exposed to downstream code. - Session loading: main.ts finds `graph.yaml` files under `definitions/` and registers a PropertyGraph action per file. At most one graph.yaml is accepted per project. - Action index: actions/index.ts and session.ts expose PropertyGraph so downstream code treats it like tables and operations. - Emitter extensions: description and synonyms on both entities and relationships, fieldWildcard normalization for `fields: { importAll: true, except: [...] }`, and an OPTIONS clause on the graph carrying the graph description. - Proto: adds `is_default` to GraphLabel for the label wiring above. - Coverage: property_graph_test.ts grows for the new normalization and emitter behavior, and main_test.ts adds session-level tests plus a propertyGraph case in the shared test-helper switch. Older `dataformCoreVersion` values silently skip PropertyGraph files so projects pinning an earlier core do not break at load time. Porting the changes from PR (#2251)
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.
Introduces core/actions/property_graph.ts implementing the PropertyGraph action for BigQuery Property Graph DDL generation. The class parses PropertyGraphConfig, applies normalization (scalar keys, string field shorthand, joinKeys array shorthand, default label synthesis, wildcard expansion), validates cross-entity references and emits the NODE TABLES / EDGE TABLES graph body.
Catalog-based data sources (BigLake/Iceberg 4-part references) are parsed but rejected at compile time until project-wide 4-part Target support lands.
Adds 26 direct-instantiation unit tests covering happy path, edge cases and error paths. Remaining tests requiring session-registered actions and runMainInVm are deferred.
Files: