@google-cloud/kcmd 0.0.0-stage → 0.1.0
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/LICENSE +203 -0
- package/README.md +266 -2
- package/build/ts/kcmd/cli.js +19578 -0
- package/build/ts/kcmd/gcp/alloydb.d.ts +12 -0
- package/build/ts/kcmd/gcp/alloydb.js +70 -0
- package/build/ts/kcmd/gcp/api.d.ts +29 -0
- package/build/ts/kcmd/gcp/api.js +162 -0
- package/build/ts/kcmd/gcp/biglake.d.ts +16 -0
- package/build/ts/kcmd/gcp/biglake.js +50 -0
- package/build/ts/kcmd/gcp/bigquery.d.ts +57 -0
- package/build/ts/kcmd/gcp/bigquery.js +134 -0
- package/build/ts/kcmd/gcp/context.d.ts +10 -0
- package/build/ts/kcmd/gcp/context.js +74 -0
- package/build/ts/kcmd/gcp/crm.d.ts +13 -0
- package/build/ts/kcmd/gcp/crm.js +91 -0
- package/build/ts/kcmd/gcp/dataplex.d.ts +147 -0
- package/build/ts/kcmd/gcp/dataplex.js +406 -0
- package/build/ts/kcmd/gcp/index.d.ts +3 -0
- package/build/ts/kcmd/gcp/index.js +21 -0
- package/build/ts/kcmd/gcp/spanner.d.ts +63 -0
- package/build/ts/kcmd/gcp/spanner.js +123 -0
- package/build/ts/kcmd/index.d.ts +7 -0
- package/build/ts/kcmd/index.js +46 -0
- package/build/ts/kcmd/layout.d.ts +16 -0
- package/build/ts/kcmd/layout.js +31 -0
- package/build/ts/kcmd/layouts/documents.d.ts +24 -0
- package/build/ts/kcmd/layouts/documents.js +264 -0
- package/build/ts/kcmd/layouts/okf.d.ts +31 -0
- package/build/ts/kcmd/layouts/okf.js +344 -0
- package/build/ts/kcmd/layouts/semantic-model.d.ts +61 -0
- package/build/ts/kcmd/layouts/semantic-model.js +542 -0
- package/build/ts/kcmd/layouts/standard.d.ts +13 -0
- package/build/ts/kcmd/layouts/standard.js +108 -0
- package/build/ts/kcmd/manifest.d.ts +34 -0
- package/build/ts/kcmd/manifest.js +262 -0
- package/build/ts/kcmd/metadata.d.ts +25 -0
- package/build/ts/kcmd/metadata.js +8 -0
- package/build/ts/kcmd/okf/catalog_residue.d.ts +14 -0
- package/build/ts/kcmd/okf/catalog_residue.js +124 -0
- package/build/ts/kcmd/okf/concept.d.ts +14 -0
- package/build/ts/kcmd/okf/concept.js +104 -0
- package/build/ts/kcmd/okf/concept_to_entry.d.ts +8 -0
- package/build/ts/kcmd/okf/concept_to_entry.js +254 -0
- package/build/ts/kcmd/okf/init_okf_workspace.d.ts +15 -0
- package/build/ts/kcmd/okf/init_okf_workspace.js +115 -0
- package/build/ts/kcmd/okf/links.d.ts +23 -0
- package/build/ts/kcmd/okf/links.js +468 -0
- package/build/ts/kcmd/okf/okf_metadata.d.ts +12 -0
- package/build/ts/kcmd/okf/okf_metadata.js +82 -0
- package/build/ts/kcmd/semantic/bigquery.d.ts +22 -0
- package/build/ts/kcmd/semantic/bigquery.js +525 -0
- package/build/ts/kcmd/semantic/binding.d.ts +3 -0
- package/build/ts/kcmd/semantic/binding.js +97 -0
- package/build/ts/kcmd/semantic/catalog_entry.d.ts +24 -0
- package/build/ts/kcmd/semantic/catalog_entry.js +35 -0
- package/build/ts/kcmd/semantic/converters/owl/convert.d.ts +26 -0
- package/build/ts/kcmd/semantic/converters/owl/convert.js +41 -0
- package/build/ts/kcmd/semantic/converters/owl/model.d.ts +98 -0
- package/build/ts/kcmd/semantic/converters/owl/model.js +30 -0
- package/build/ts/kcmd/semantic/converters/owl/parse.d.ts +11 -0
- package/build/ts/kcmd/semantic/converters/owl/parse.js +634 -0
- package/build/ts/kcmd/semantic/converters/owl/to_ir.d.ts +19 -0
- package/build/ts/kcmd/semantic/converters/owl/to_ir.js +390 -0
- package/build/ts/kcmd/semantic/deploy_bigquery.d.ts +20 -0
- package/build/ts/kcmd/semantic/deploy_bigquery.js +226 -0
- package/build/ts/kcmd/semantic/deploy_knowledge_catalog.d.ts +129 -0
- package/build/ts/kcmd/semantic/deploy_knowledge_catalog.js +1396 -0
- package/build/ts/kcmd/semantic/deploy_spanner.d.ts +15 -0
- package/build/ts/kcmd/semantic/deploy_spanner.js +150 -0
- package/build/ts/kcmd/semantic/deployment_target.d.ts +93 -0
- package/build/ts/kcmd/semantic/deployment_target.js +379 -0
- package/build/ts/kcmd/semantic/graph_ddl.d.ts +34 -0
- package/build/ts/kcmd/semantic/graph_ddl.js +563 -0
- package/build/ts/kcmd/semantic/import_model.d.ts +50 -0
- package/build/ts/kcmd/semantic/import_model.js +1275 -0
- package/build/ts/kcmd/semantic/ir.d.ts +589 -0
- package/build/ts/kcmd/semantic/ir.js +247 -0
- package/build/ts/kcmd/semantic/kc_actions.d.ts +45 -0
- package/build/ts/kcmd/semantic/kc_actions.js +531 -0
- package/build/ts/kcmd/semantic/kc_constraints.d.ts +44 -0
- package/build/ts/kcmd/semantic/kc_constraints.js +279 -0
- package/build/ts/kcmd/semantic/kc_converter.d.ts +31 -0
- package/build/ts/kcmd/semantic/kc_converter.js +824 -0
- package/build/ts/kcmd/semantic/kc_custom_types.d.ts +70 -0
- package/build/ts/kcmd/semantic/kc_custom_types.js +828 -0
- package/build/ts/kcmd/semantic/kc_entries.d.ts +155 -0
- package/build/ts/kcmd/semantic/kc_entries.js +284 -0
- package/build/ts/kcmd/semantic/kc_ids.d.ts +103 -0
- package/build/ts/kcmd/semantic/kc_ids.js +191 -0
- package/build/ts/kcmd/semantic/knowledge_catalog.d.ts +32 -0
- package/build/ts/kcmd/semantic/knowledge_catalog.js +1043 -0
- package/build/ts/kcmd/semantic/loader.d.ts +262 -0
- package/build/ts/kcmd/semantic/loader.js +3440 -0
- package/build/ts/kcmd/semantic/names.d.ts +10 -0
- package/build/ts/kcmd/semantic/names.js +85 -0
- package/build/ts/kcmd/semantic/osi_converter.d.ts +60 -0
- package/build/ts/kcmd/semantic/osi_converter.js +911 -0
- package/build/ts/kcmd/semantic/parameters.d.ts +18 -0
- package/build/ts/kcmd/semantic/parameters.js +152 -0
- package/build/ts/kcmd/semantic/pull_kc.d.ts +14 -0
- package/build/ts/kcmd/semantic/pull_kc.js +346 -0
- package/build/ts/kcmd/semantic/resolve_inheritance.d.ts +54 -0
- package/build/ts/kcmd/semantic/resolve_inheritance.js +330 -0
- package/build/ts/kcmd/semantic/resolve_profiles.d.ts +250 -0
- package/build/ts/kcmd/semantic/resolve_profiles.js +1822 -0
- package/build/ts/kcmd/semantic/runtime/agent_tools.d.ts +93 -0
- package/build/ts/kcmd/semantic/runtime/agent_tools.js +243 -0
- package/build/ts/kcmd/semantic/runtime/dialect.d.ts +13 -0
- package/build/ts/kcmd/semantic/runtime/dialect.js +39 -0
- package/build/ts/kcmd/semantic/runtime/runtime.d.ts +94 -0
- package/build/ts/kcmd/semantic/runtime/runtime.js +318 -0
- package/build/ts/kcmd/semantic/runtime/store.d.ts +112 -0
- package/build/ts/kcmd/semantic/runtime/store.js +344 -0
- package/build/ts/kcmd/semantic/skills.d.ts +110 -0
- package/build/ts/kcmd/semantic/skills.js +697 -0
- package/build/ts/kcmd/semantic/source_dialect.d.ts +10 -0
- package/build/ts/kcmd/semantic/source_dialect.js +261 -0
- package/build/ts/kcmd/semantic/source_entries.d.ts +12 -0
- package/build/ts/kcmd/semantic/source_entries.js +282 -0
- package/build/ts/kcmd/semantic/spanner.d.ts +18 -0
- package/build/ts/kcmd/semantic/spanner.js +60 -0
- package/build/ts/kcmd/semantic/sql_expr_utils.d.ts +17 -0
- package/build/ts/kcmd/semantic/sql_expr_utils.js +221 -0
- package/build/ts/kcmd/semantic/sql_identifiers.d.ts +6 -0
- package/build/ts/kcmd/semantic/sql_identifiers.js +267 -0
- package/build/ts/kcmd/semantic/sql_parser.d.ts +44 -0
- package/build/ts/kcmd/semantic/sql_parser.js +378 -0
- package/build/ts/kcmd/semantic/transpile.d.ts +74 -0
- package/build/ts/kcmd/semantic/transpile.js +563 -0
- package/build/ts/kcmd/semantic/validate.d.ts +35 -0
- package/build/ts/kcmd/semantic/validate.js +1899 -0
- package/build/ts/kcmd/semantic/yaml_options.d.ts +6 -0
- package/build/ts/kcmd/semantic/yaml_options.js +58 -0
- package/build/ts/kcmd/semantic/yaml_update.d.ts +26 -0
- package/build/ts/kcmd/semantic/yaml_update.js +782 -0
- package/build/ts/kcmd/snapshot.d.ts +33 -0
- package/build/ts/kcmd/snapshot.js +379 -0
- package/build/ts/kcmd/source.d.ts +31 -0
- package/build/ts/kcmd/source.js +119 -0
- package/build/ts/kcmd/sources/bq-dataset.d.ts +17 -0
- package/build/ts/kcmd/sources/bq-dataset.js +131 -0
- package/build/ts/kcmd/sources/entrygroup.d.ts +21 -0
- package/build/ts/kcmd/sources/entrygroup.js +83 -0
- package/build/ts/kcmd/sources/kb.d.ts +21 -0
- package/build/ts/kcmd/sources/kb.js +82 -0
- package/build/ts/kcmd/sources/semantic-model.d.ts +18 -0
- package/build/ts/kcmd/sources/semantic-model.js +48 -0
- package/build/ts/kcmd/sync.d.ts +35 -0
- package/build/ts/kcmd/sync.js +697 -0
- package/package.json +62 -4
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Knowledge Catalog resource naming and ID helpers.
|
|
3
|
+
//
|
|
4
|
+
// Provides a shared set of rules for constructing and parsing Knowledge Catalog
|
|
5
|
+
// resource names across the emitter, model validation, the catalog reader, and
|
|
6
|
+
// the deployment pipeline. This module imports only the IR to avoid circular
|
|
7
|
+
// dependencies.
|
|
8
|
+
//
|
|
9
|
+
// Terminology used in this module:
|
|
10
|
+
// - A "full resource name" includes the GCP container path, e.g.
|
|
11
|
+
// `projects/<p>/locations/<l>/entryGroups/<eg>/entries/<entryId>`.
|
|
12
|
+
// - A "bare entry ID" (or "entry-link ID") is the trailing `<entryId>`
|
|
13
|
+
// (or `<linkId>`) segment without the container prefix, e.g.
|
|
14
|
+
// `retail_sales.entities.store_orders` (V1) or
|
|
15
|
+
// `retail_sales/entities/store_orders` (V2).
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Namer = exports.DEFAULT_TYPE_LOCATION = exports.DEFAULT_TYPE_PROJECT = void 0;
|
|
18
|
+
exports.relationshipLinkId = relationshipLinkId;
|
|
19
|
+
exports.semanticLinkId = semanticLinkId;
|
|
20
|
+
exports.ownedEntryIdPrefixes = ownedEntryIdPrefixes;
|
|
21
|
+
exports.entryIdOf = entryIdOf;
|
|
22
|
+
exports.slug = slug;
|
|
23
|
+
exports.linkSlug = linkSlug;
|
|
24
|
+
const node_crypto_1 = require("node:crypto");
|
|
25
|
+
// Where the `semantic-*` and `schema` system types live: built-in types in
|
|
26
|
+
// project `dataplex-types`, location `global`. Callers may override to
|
|
27
|
+
// reference them from a staging project.
|
|
28
|
+
exports.DEFAULT_TYPE_PROJECT = 'dataplex-types';
|
|
29
|
+
exports.DEFAULT_TYPE_LOCATION = 'global';
|
|
30
|
+
// Matches the container path and trailing bare ID of any Knowledge Catalog
|
|
31
|
+
// resource name:
|
|
32
|
+
// - Entry-group paths (`ENTRY_GROUP_PATH_RE`):
|
|
33
|
+
// `projects/<p>/locations/<l>/entryGroups/<eg>/(entries|entryLinks)/<id>`
|
|
34
|
+
// - Type paths (`TYPE_PATH_RE`):
|
|
35
|
+
// `projects/<p>/locations/<l>/(entryTypes|aspectTypes|entryLinkTypes)/<id>`
|
|
36
|
+
const ENTRY_GROUP_PATH_RE = /entryGroups\/[^/]+\/(?:entries|entryLinks)/;
|
|
37
|
+
const TYPE_PATH_RE = /entryTypes|aspectTypes|entryLinkTypes/;
|
|
38
|
+
const RESOURCE_ID_RE = new RegExp(`^projects/[^/]+/locations/[^/]+/` +
|
|
39
|
+
`(?:${ENTRY_GROUP_PATH_RE.source}|${TYPE_PATH_RE.source})/(.+)$`);
|
|
40
|
+
/**
|
|
41
|
+
* Builds the fully-qualified resource names and bare entry/link IDs for a
|
|
42
|
+
* destination. Kept in one place so entry/type name construction is consistent
|
|
43
|
+
* and the emitter body reads as pure mapping.
|
|
44
|
+
*/
|
|
45
|
+
class Namer {
|
|
46
|
+
typeProject;
|
|
47
|
+
typeLocation;
|
|
48
|
+
container;
|
|
49
|
+
v2Aspects;
|
|
50
|
+
constructor(opts) {
|
|
51
|
+
this.typeProject = opts.systemTypeProject ?? exports.DEFAULT_TYPE_PROJECT;
|
|
52
|
+
this.typeLocation = opts.systemTypeLocation ?? exports.DEFAULT_TYPE_LOCATION;
|
|
53
|
+
this.container = `projects/${opts.project}/locations/${opts.location}/entryGroups/${opts.entryGroup}`;
|
|
54
|
+
this.v2Aspects = opts.v2Aspects ?? false;
|
|
55
|
+
}
|
|
56
|
+
/** Full resource name of a system type. `kind` selects the collection. */
|
|
57
|
+
typeName(kind, name) {
|
|
58
|
+
return `projects/${this.typeProject}/locations/${this.typeLocation}/${kind}Types/${name}`;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Aspect-map key: the `project.location.type` reference form the client keys
|
|
62
|
+
* an entry's aspects by (see dataplex._nameToTypeRef / _fixEntry).
|
|
63
|
+
*/
|
|
64
|
+
aspectRef(name) {
|
|
65
|
+
return `${this.typeProject}.${this.typeLocation}.${name}`;
|
|
66
|
+
}
|
|
67
|
+
/** Full resource name of an entry in the destination entry group. */
|
|
68
|
+
entry(entryId) {
|
|
69
|
+
return `${this.container}/entries/${entryId}`;
|
|
70
|
+
}
|
|
71
|
+
/** Full resource name of an entry link in the destination entry group. */
|
|
72
|
+
entryLink(linkId) {
|
|
73
|
+
return `${this.container}/entryLinks/${linkId}`;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Bare entry ID for a semantic model, used as the `semantic-model` anchor
|
|
77
|
+
* entry's ID and as the prefix for action and constraint entry IDs.
|
|
78
|
+
*
|
|
79
|
+
* V1 sanitizes `model.name` with `slug()` because `model.name` may contain
|
|
80
|
+
* characters (e.g. spaces) that Knowledge Catalog disallows in entry IDs.
|
|
81
|
+
* V2 returns `model.name` verbatim because V2 model names are restricted to
|
|
82
|
+
* letters, digits, underscores and hyphens, all of which `slug()` keeps. This
|
|
83
|
+
* means `slug(model.name)` and `model.name` are equal for valid V2 models.
|
|
84
|
+
*/
|
|
85
|
+
modelId(model) {
|
|
86
|
+
return this.v2Aspects ? model.name : slug(model.name);
|
|
87
|
+
}
|
|
88
|
+
/** Bare entry ID for an entity within a semantic model. */
|
|
89
|
+
entityId(model, entity) {
|
|
90
|
+
return this.v2Aspects ?
|
|
91
|
+
`${model.name}/entities/${entity.name}` :
|
|
92
|
+
`${slug(model.name)}.entities.${slug(entity.name)}`;
|
|
93
|
+
}
|
|
94
|
+
/** Bare entry ID for a metric within a semantic model. */
|
|
95
|
+
metricId(model, metric) {
|
|
96
|
+
return this.v2Aspects ?
|
|
97
|
+
`${model.name}/metrics/${metric.name}` :
|
|
98
|
+
`${slug(model.name)}.metrics.${slug(metric.name)}`;
|
|
99
|
+
}
|
|
100
|
+
/** Bare V2 entry ID for a relationship within a semantic model. */
|
|
101
|
+
relationshipId(model, rel) {
|
|
102
|
+
return `${model.name}/relationships/${rel.name}`;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Entry link IDs are more restricted than entry IDs: lowercase letters,
|
|
106
|
+
* numbers and hyphens only, starting with a letter (see `linkSlug`). Does not
|
|
107
|
+
* branch on `v2Aspects`.
|
|
108
|
+
*/
|
|
109
|
+
linkId(model, rel) {
|
|
110
|
+
return relationshipLinkId(model.name, rel.name);
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Bare entry ID for a verbatim model/profile file copy (used while
|
|
114
|
+
* `KC_V2_ASPECTS` is off). Dotted under both layouts.
|
|
115
|
+
*/
|
|
116
|
+
fileEntryId(modelName, fileName) {
|
|
117
|
+
return `${slug(modelName)}.files.${slug(fileName)}`;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
exports.Namer = Namer;
|
|
121
|
+
/** Entry-link ID for a relationship on a model. */
|
|
122
|
+
function relationshipLinkId(modelName, relName) {
|
|
123
|
+
return linkSlug(`${modelName}-${relName}`);
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* ID of a link push writes: `semantic-<kind>-` and the first 32 hex characters
|
|
127
|
+
* of the SHA-256 of `parts` joined by '/'. It must stay the same across
|
|
128
|
+
* releases, so that push finds the links it wrote.
|
|
129
|
+
*/
|
|
130
|
+
function semanticLinkId(kind, ...parts) {
|
|
131
|
+
const digest = (0, node_crypto_1.createHash)('sha256').update(parts.join('/'), 'utf8').digest('hex');
|
|
132
|
+
return `semantic-${kind}-${digest.slice(0, 32)}`;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Entry-ID prefixes owned by `modelName` across both the first-generation
|
|
136
|
+
* dotted layout and the second-generation slash layout.
|
|
137
|
+
*
|
|
138
|
+
* The dotted prefixes use `slug(modelName)` to match V1 entries, while the
|
|
139
|
+
* slash prefixes use `modelName` verbatim to match V2 entity, metric and
|
|
140
|
+
* relationship entries. Because V2 model names are restricted to letters,
|
|
141
|
+
* digits, underscores and hyphens, all of which `slug()` keeps,
|
|
142
|
+
* `slug(modelName)` and `modelName` are equal for valid V2 models.
|
|
143
|
+
*/
|
|
144
|
+
function ownedEntryIdPrefixes(modelName) {
|
|
145
|
+
const s = slug(modelName);
|
|
146
|
+
return [
|
|
147
|
+
`${s}.entities.`,
|
|
148
|
+
`${s}.metrics.`,
|
|
149
|
+
`${s}.actions.`,
|
|
150
|
+
`${s}.constraints.`,
|
|
151
|
+
`${s}.files.`,
|
|
152
|
+
`${modelName}/entities/`,
|
|
153
|
+
`${modelName}/metrics/`,
|
|
154
|
+
`${modelName}/relationships/`,
|
|
155
|
+
];
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Extracts the bare resource ID from a full Knowledge Catalog resource name
|
|
159
|
+
* (entry, entry link, or type), or returns `resourceName` unchanged if it does
|
|
160
|
+
* not match a known resource container.
|
|
161
|
+
*
|
|
162
|
+
* Matches known container collections via `RESOURCE_ID_RE` and leaves
|
|
163
|
+
* non-matching strings untouched, rather than falling back to
|
|
164
|
+
* `.split('/').pop()` (which would corrupt an already-bare V2 slash entry ID
|
|
165
|
+
* like `'retail_sales/entities/store_orders'` into `'store_orders'`).
|
|
166
|
+
*/
|
|
167
|
+
function entryIdOf(resourceName) {
|
|
168
|
+
const m = resourceName.match(RESOURCE_ID_RE);
|
|
169
|
+
return m ? m[1] : resourceName;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Entry IDs allow letters, numbers, underscores, hyphens, and periods; maps
|
|
173
|
+
* anything else to an underscore.
|
|
174
|
+
*/
|
|
175
|
+
function slug(s) {
|
|
176
|
+
return s.replace(/[^A-Za-z0-9_.-]/g, '_');
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Entry link IDs allow only lowercase letters, numbers and hyphens, must start
|
|
180
|
+
* with a letter, must end with a letter or number, and are capped at 63 chars.
|
|
181
|
+
*/
|
|
182
|
+
function linkSlug(s) {
|
|
183
|
+
const out = s.toLowerCase()
|
|
184
|
+
.replace(/[^a-z0-9-]+/g, '-')
|
|
185
|
+
.replace(/-+/g, '-')
|
|
186
|
+
.replace(/^[^a-z]+/, '')
|
|
187
|
+
.replace(/^-+|-+$/g, '')
|
|
188
|
+
.slice(0, 63)
|
|
189
|
+
.replace(/-+$/, '');
|
|
190
|
+
return out || 'link';
|
|
191
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Entry, EntryLink } from '../gcp/dataplex';
|
|
2
|
+
import type { OverviewSidecar } from '../layouts/semantic-model';
|
|
3
|
+
import { SemanticModel } from './ir';
|
|
4
|
+
import { FileCopy } from './kc_custom_types';
|
|
5
|
+
export interface KcGenerateOptions {
|
|
6
|
+
project: string;
|
|
7
|
+
location: string;
|
|
8
|
+
entryGroup: string;
|
|
9
|
+
systemTypeProject?: string;
|
|
10
|
+
systemTypeLocation?: string;
|
|
11
|
+
emitExpressions?: boolean;
|
|
12
|
+
v2Aspects?: boolean;
|
|
13
|
+
sourceFiles?: FileCopy[];
|
|
14
|
+
overviews?: ReadonlyMap<string, OverviewSidecar>;
|
|
15
|
+
}
|
|
16
|
+
export interface KcResources {
|
|
17
|
+
entries: Entry[];
|
|
18
|
+
entryLinks: EntryLink[];
|
|
19
|
+
warnings: string[];
|
|
20
|
+
ownedPrefixes: string[];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Generates the Knowledge Catalog resources for a semantic model.
|
|
24
|
+
*
|
|
25
|
+
* Returns the entries (model anchor first, then entities, metrics and, with
|
|
26
|
+
* v2Aspects, relationships), the entry links of the relationships and, with
|
|
27
|
+
* v2Aspects, of each entity's parents, and any warnings collected while
|
|
28
|
+
* mapping the IR (missing keys, un-typed metrics, skipped M:N relationships).
|
|
29
|
+
* The resources reference the built-in system types; they do not create them.
|
|
30
|
+
*/
|
|
31
|
+
export declare function generateCatalogResources(model: SemanticModel, opts: KcGenerateOptions): KcResources;
|
|
32
|
+
export declare function fileCopyData(file: FileCopy): Record<string, any>;
|