@google-cloud/kcmd 0.1.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -20
- package/build/ts/kcmd/cli.js +6164 -5631
- package/build/ts/kcmd/gcp/biglake.d.ts +2 -0
- package/build/ts/kcmd/gcp/biglake.js +13 -4
- package/build/ts/kcmd/gcp/spanner.d.ts +10 -0
- package/build/ts/kcmd/gcp/spanner.js +6 -3
- package/build/ts/kcmd/layouts/okf.js +49 -7
- package/build/ts/kcmd/layouts/semantic-model.d.ts +13 -0
- package/build/ts/kcmd/layouts/semantic-model.js +129 -50
- package/build/ts/kcmd/okf/concept.d.ts +1 -1
- package/build/ts/kcmd/okf/concept.js +6 -0
- package/build/ts/kcmd/okf/concept_to_entry.d.ts +2 -0
- package/build/ts/kcmd/okf/concept_to_entry.js +29 -2
- package/build/ts/kcmd/okf/init_okf_workspace.js +7 -9
- package/build/ts/kcmd/okf/okf_metadata.js +17 -0
- package/build/ts/kcmd/semantic/bigquery.js +139 -195
- package/build/ts/kcmd/semantic/binding.js +14 -19
- package/build/ts/kcmd/semantic/deploy_bigquery.js +6 -13
- package/build/ts/kcmd/semantic/deploy_knowledge_catalog.d.ts +10 -35
- package/build/ts/kcmd/semantic/deploy_knowledge_catalog.js +105 -162
- package/build/ts/kcmd/semantic/deploy_spanner.js +7 -14
- package/build/ts/kcmd/semantic/deployment_target.d.ts +1 -4
- package/build/ts/kcmd/semantic/deployment_target.js +6 -62
- package/build/ts/kcmd/semantic/graph_ddl.d.ts +10 -0
- package/build/ts/kcmd/semantic/graph_ddl.js +152 -59
- package/build/ts/kcmd/semantic/import_model.d.ts +26 -4
- package/build/ts/kcmd/semantic/import_model.js +531 -111
- package/build/ts/kcmd/semantic/ir.d.ts +2 -4
- package/build/ts/kcmd/semantic/kc_converter.d.ts +7 -1
- package/build/ts/kcmd/semantic/kc_converter.js +32 -27
- package/build/ts/kcmd/semantic/kc_custom_types.d.ts +5 -12
- package/build/ts/kcmd/semantic/kc_custom_types.js +43 -114
- package/build/ts/kcmd/semantic/kc_ids.d.ts +4 -5
- package/build/ts/kcmd/semantic/kc_ids.js +4 -7
- package/build/ts/kcmd/semantic/knowledge_catalog.d.ts +0 -3
- package/build/ts/kcmd/semantic/knowledge_catalog.js +3 -86
- package/build/ts/kcmd/semantic/loader.d.ts +7 -11
- package/build/ts/kcmd/semantic/loader.js +282 -171
- package/build/ts/kcmd/semantic/osi_converter.js +14 -65
- package/build/ts/kcmd/semantic/parameters.d.ts +1 -0
- package/build/ts/kcmd/semantic/parameters.js +22 -3
- package/build/ts/kcmd/semantic/pull_kc.d.ts +1 -5
- package/build/ts/kcmd/semantic/pull_kc.js +38 -112
- package/build/ts/kcmd/semantic/resolve_inheritance.d.ts +7 -2
- package/build/ts/kcmd/semantic/resolve_inheritance.js +37 -21
- package/build/ts/kcmd/semantic/resolve_profiles.d.ts +51 -10
- package/build/ts/kcmd/semantic/resolve_profiles.js +213 -32
- package/build/ts/kcmd/semantic/runtime/runtime.d.ts +4 -12
- package/build/ts/kcmd/semantic/runtime/runtime.js +4 -21
- package/build/ts/kcmd/semantic/runtime/store.d.ts +14 -19
- package/build/ts/kcmd/semantic/runtime/store.js +21 -37
- package/build/ts/kcmd/semantic/source_dialect.d.ts +9 -2
- package/build/ts/kcmd/semantic/source_dialect.js +83 -33
- package/build/ts/kcmd/semantic/source_entries.d.ts +1 -1
- package/build/ts/kcmd/semantic/source_entries.js +95 -36
- package/build/ts/kcmd/semantic/sql_expr_utils.d.ts +13 -7
- package/build/ts/kcmd/semantic/sql_expr_utils.js +240 -67
- package/build/ts/kcmd/semantic/sql_parser.d.ts +5 -2
- package/build/ts/kcmd/semantic/sql_parser.js +22 -0
- package/build/ts/kcmd/semantic/transpile.d.ts +12 -10
- package/build/ts/kcmd/semantic/transpile.js +79 -61
- package/build/ts/kcmd/semantic/validate.d.ts +37 -2
- package/build/ts/kcmd/semantic/validate.js +467 -126
- package/build/ts/kcmd/snapshot.d.ts +4 -0
- package/build/ts/kcmd/snapshot.js +7 -0
- package/build/ts/kcmd/sync.js +44 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -179,43 +179,41 @@ kcmd push
|
|
|
179
179
|
```
|
|
180
180
|
|
|
181
181
|
For the semantic-model scope, `kcmd push` deploys the model as a property graph
|
|
182
|
-
(`CREATE OR REPLACE PROPERTY GRAPH`) to the backend
|
|
183
|
-
|
|
184
|
-
model deploys to either
|
|
185
|
-
|
|
182
|
+
(`CREATE OR REPLACE PROPERTY GRAPH`) to the backend each entry of the model's
|
|
183
|
+
`deployments` list names in its `target`: **BigQuery Graph** or **Spanner
|
|
184
|
+
Graph**. The same authored model deploys to either. Pass `--validate-only
|
|
185
|
+
--print` to print the generated DDL without executing it. For a BigQuery
|
|
186
186
|
target this path additionally reads the target dataset's metadata
|
|
187
187
|
(`bigquery.datasets.get`) to pin the query job's processing location; the call
|
|
188
188
|
degrades gracefully when the permission is absent, so a narrower service account
|
|
189
189
|
still works but falls back to BigQuery's own location inference. Each dataset
|
|
190
190
|
`source` is the table's GCP resource name, such as
|
|
191
191
|
`bigquery.googleapis.com/projects/<p>/datasets/<d>/tables/<t>`.
|
|
192
|
-
(A Spanner target names its tables inside one database
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
left in the entry group that the push no longer includes. See
|
|
204
|
-
[docs/semantic-model/](docs/semantic-model/README.md) for the full guide,
|
|
205
|
-
including how re-push reconciles removed entities, metrics, relationships, and
|
|
206
|
-
models.
|
|
192
|
+
(A Spanner target names its tables inside one database. Spanner Graph has no
|
|
193
|
+
`MEASURE`, so a Spanner deployment uses a profile that excludes every metric.)
|
|
194
|
+
Spanner Graph needs an Enterprise or Enterprise Plus edition instance, or a free
|
|
195
|
+
trial instance. Push refuses a Spanner target on a Standard edition instance
|
|
196
|
+
before it writes anything.
|
|
197
|
+
|
|
198
|
+
`kcmd push` publishes the model and its sibling profile files to Knowledge
|
|
199
|
+
Catalog before deploying the selected `deployments` entries (see
|
|
200
|
+
[Reference — `kcmd push`](docs/semantic-model/reference.md#push) for
|
|
201
|
+
`--deployment`, `--no-deployment`, `--print`, and `--force-remove`, and
|
|
202
|
+
[docs/semantic-model/](docs/semantic-model/README.md) for the full guide).
|
|
207
203
|
|
|
208
204
|
NOTE: The CLI uses `gcloud` to obtain authentication tokens, so ensure you are authenticated via `gcloud auth application-default login`.
|
|
209
205
|
|
|
210
206
|
#### Environment variables
|
|
211
207
|
|
|
212
208
|
Two optional variables override where `kcmd` talks to the catalog. Both default
|
|
213
|
-
to production, so you normally leave them unset.
|
|
209
|
+
to production, so you normally leave them unset. A third, `KC_V2_ASPECTS`, is a
|
|
210
|
+
temporary escape hatch.
|
|
214
211
|
|
|
215
212
|
| Variable | Effect |
|
|
216
213
|
|----------|--------|
|
|
217
214
|
| `DATAPLEX_ENDPOINT` | Base URL for the Knowledge Catalog (Dataplex) API. Defaults to `https://dataplex.googleapis.com`. Set it to reach a non-prod host. |
|
|
218
215
|
| `KC_TYPE_PROJECT` | Project the built-in `semantic-*` system types are read from on a semantic-model push. Defaults to `dataplex-types`. |
|
|
216
|
+
| `KC_V2_ASPECTS` | Push and pull use the second-generation Knowledge Catalog types by default. `KC_V2_ASPECTS=0` temporarily restores the first-generation path, which will be removed; any other value has no effect. |
|
|
219
217
|
|
|
220
218
|
### MCP Server
|
|
221
219
|
|