@kaelio/ktx 0.14.0 → 0.15.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/assets/python/{kaelio_ktx-0.14.0-py3-none-any.whl → kaelio_ktx-0.15.0-py3-none-any.whl} +0 -0
- package/assets/python/manifest.json +4 -4
- package/dist/.tsbuildinfo +1 -1
- package/dist/commands/setup-commands.js +1 -0
- package/dist/context/ingest/adapters/sigma/chunk.d.ts +6 -0
- package/dist/context/ingest/adapters/sigma/chunk.js +119 -0
- package/dist/context/ingest/adapters/sigma/client-port.d.ts +45 -0
- package/dist/context/ingest/adapters/sigma/client-port.js +1 -0
- package/dist/context/ingest/adapters/sigma/client.d.ts +33 -0
- package/dist/context/ingest/adapters/sigma/client.js +176 -0
- package/dist/context/ingest/adapters/sigma/detect.d.ts +1 -0
- package/dist/context/ingest/adapters/sigma/detect.js +23 -0
- package/dist/context/ingest/adapters/sigma/fetch.d.ts +14 -0
- package/dist/context/ingest/adapters/sigma/fetch.js +191 -0
- package/dist/context/ingest/adapters/sigma/local-sigma.adapter.d.ts +17 -0
- package/dist/context/ingest/adapters/sigma/local-sigma.adapter.js +41 -0
- package/dist/context/ingest/adapters/sigma/project.d.ts +8 -0
- package/dist/context/ingest/adapters/sigma/project.js +186 -0
- package/dist/context/ingest/adapters/sigma/sigma.adapter.d.ts +18 -0
- package/dist/context/ingest/adapters/sigma/sigma.adapter.js +43 -0
- package/dist/context/ingest/adapters/sigma/types.d.ts +80 -0
- package/dist/context/ingest/adapters/sigma/types.js +82 -0
- package/dist/context/ingest/local-adapters.d.ts +2 -1
- package/dist/context/ingest/local-adapters.js +22 -0
- package/dist/context/project/config.d.ts +30 -0
- package/dist/context/project/driver-schemas.d.ts +15 -0
- package/dist/context/project/driver-schemas.js +39 -0
- package/dist/public-ingest.js +1 -0
- package/dist/setup-sources.d.ts +2 -1
- package/dist/setup-sources.js +84 -0
- package/dist/skills/sigma_ingest/SKILL.md +189 -0
- package/package.json +1 -1
package/dist/setup-sources.js
CHANGED
|
@@ -10,6 +10,8 @@ import { createGoogleDocsClients, verifyGdriveFolderAndCountDocs, } from './cont
|
|
|
10
10
|
import { gdriveServiceAccountKeySchema } from './context/ingest/adapters/gdrive/types.js';
|
|
11
11
|
import { cloneOrPull, testRepoConnection } from './context/ingest/repo-fetch.js';
|
|
12
12
|
import { DEFAULT_METABASE_CLIENT_CONFIG, MetabaseClient } from './context/ingest/adapters/metabase/client.js';
|
|
13
|
+
import { DEFAULT_SIGMA_CLIENT_CONFIG, DefaultSigmaClient } from './context/ingest/adapters/sigma/client.js';
|
|
14
|
+
import { sigmaRuntimeConfigFromLocalConnection } from './context/ingest/adapters/sigma/local-sigma.adapter.js';
|
|
13
15
|
import { discoverMetabaseDatabases } from './context/ingest/adapters/metabase/mapping.js';
|
|
14
16
|
import { loadDbtSchemaFiles } from './context/ingest/dbt-shared/schema-files.js';
|
|
15
17
|
import { loadProjectInfo } from './context/ingest/dbt-shared/project-vars.js';
|
|
@@ -38,6 +40,7 @@ const SOURCE_OPTIONS = [
|
|
|
38
40
|
{ value: 'metricflow', label: 'MetricFlow' },
|
|
39
41
|
{ value: 'looker', label: 'Looker' },
|
|
40
42
|
{ value: 'lookml', label: 'LookML' },
|
|
43
|
+
{ value: 'sigma', label: 'Sigma Computing' },
|
|
41
44
|
{ value: 'gdrive', label: 'Google Drive' },
|
|
42
45
|
];
|
|
43
46
|
const SOURCE_LABELS = Object.fromEntries(SOURCE_OPTIONS.map((option) => [option.value, option.label]));
|
|
@@ -124,6 +127,7 @@ const SOURCE_CREDENTIAL_FLAG = {
|
|
|
124
127
|
notion: { field: 'sourceAuthTokenRef', flag: '--source-auth-token-ref' },
|
|
125
128
|
metabase: { field: 'sourceApiKeyRef', flag: '--source-api-key-ref' },
|
|
126
129
|
looker: { field: 'sourceClientSecretRef', flag: '--source-client-secret-ref' },
|
|
130
|
+
sigma: { field: 'sourceClientSecretRef', flag: '--source-client-secret-ref' },
|
|
127
131
|
gdrive: { field: null, flag: '--gdrive-service-account-key-ref' },
|
|
128
132
|
};
|
|
129
133
|
const ALL_SOURCE_CREDENTIAL_FLAGS = [
|
|
@@ -422,6 +426,17 @@ function buildNotionConnection(args) {
|
|
|
422
426
|
max_knowledge_updates_per_run: 20,
|
|
423
427
|
};
|
|
424
428
|
}
|
|
429
|
+
function buildSigmaConnection(args) {
|
|
430
|
+
if (!args.sourceClientId) {
|
|
431
|
+
throw new Error('Missing Sigma client id: pass --source-client-id.');
|
|
432
|
+
}
|
|
433
|
+
return {
|
|
434
|
+
driver: 'sigma',
|
|
435
|
+
api_url: args.sourceUrl ?? 'https://api.sigmacomputing.com',
|
|
436
|
+
client_id: args.sourceClientId,
|
|
437
|
+
client_secret_ref: credentialRef(args.sourceClientSecretRef, 'Sigma client secret ref'),
|
|
438
|
+
};
|
|
439
|
+
}
|
|
425
440
|
function buildGdriveConnection(args) {
|
|
426
441
|
const folderId = args.gdriveFolderId?.trim();
|
|
427
442
|
if (!folderId) {
|
|
@@ -544,6 +559,24 @@ async function defaultValidateNotion(connection) {
|
|
|
544
559
|
}
|
|
545
560
|
return { ok: true, detail: `roots=${roots.length}` };
|
|
546
561
|
}
|
|
562
|
+
async function defaultValidateSigma(connection) {
|
|
563
|
+
try {
|
|
564
|
+
const runtimeConfig = sigmaRuntimeConfigFromLocalConnection('sigma-main', connection);
|
|
565
|
+
const client = new DefaultSigmaClient(runtimeConfig, DEFAULT_SIGMA_CLIENT_CONFIG);
|
|
566
|
+
try {
|
|
567
|
+
const result = await client.testConnection();
|
|
568
|
+
return result.success
|
|
569
|
+
? { ok: true, detail: 'Sigma API connection verified' }
|
|
570
|
+
: { ok: false, message: result.error ?? 'Sigma connection test failed' };
|
|
571
|
+
}
|
|
572
|
+
finally {
|
|
573
|
+
await client.cleanup();
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
catch (err) {
|
|
577
|
+
return { ok: false, message: err instanceof Error ? err.message : String(err) };
|
|
578
|
+
}
|
|
579
|
+
}
|
|
547
580
|
async function defaultValidateGdrive(connection) {
|
|
548
581
|
const config = parseGdriveConnectionConfig(connection);
|
|
549
582
|
const keyText = await resolveGdriveServiceAccountKey(config.service_account_key_ref);
|
|
@@ -1110,6 +1143,45 @@ async function promptForInteractiveSource(args, source, prompts, io, deps, defau
|
|
|
1110
1143
|
},
|
|
1111
1144
|
]);
|
|
1112
1145
|
}
|
|
1146
|
+
if (source === 'sigma') {
|
|
1147
|
+
return await runSourcePromptSteps(initialState, () => [
|
|
1148
|
+
...connectionSteps,
|
|
1149
|
+
async (state) => {
|
|
1150
|
+
const sourceUrl = await promptText(prompts, {
|
|
1151
|
+
message: 'Sigma API URL',
|
|
1152
|
+
initialValue: state.sourceUrl ?? 'https://api.sigmacomputing.com',
|
|
1153
|
+
});
|
|
1154
|
+
if (sourceUrl === undefined)
|
|
1155
|
+
return 'back';
|
|
1156
|
+
state.sourceUrl = sourceUrl;
|
|
1157
|
+
return 'next';
|
|
1158
|
+
},
|
|
1159
|
+
async (state) => {
|
|
1160
|
+
const sourceClientId = await promptText(prompts, {
|
|
1161
|
+
message: 'Sigma client ID',
|
|
1162
|
+
...(state.sourceClientId ? { initialValue: state.sourceClientId } : {}),
|
|
1163
|
+
});
|
|
1164
|
+
if (sourceClientId === undefined)
|
|
1165
|
+
return 'back';
|
|
1166
|
+
state.sourceClientId = sourceClientId;
|
|
1167
|
+
return 'next';
|
|
1168
|
+
},
|
|
1169
|
+
async (state) => {
|
|
1170
|
+
const ref = await chooseSourceCredentialRef({
|
|
1171
|
+
prompts,
|
|
1172
|
+
projectDir: args.projectDir,
|
|
1173
|
+
label: 'Sigma client secret',
|
|
1174
|
+
envName: 'SIGMA_CLIENT_SECRET',
|
|
1175
|
+
secretFileName: `${state.sourceConnectionId ?? 'sigma-main'}-client-secret`,
|
|
1176
|
+
existingRef: state.sourceClientSecretRef,
|
|
1177
|
+
});
|
|
1178
|
+
if (ref === 'back')
|
|
1179
|
+
return 'back';
|
|
1180
|
+
state.sourceClientSecretRef = ref;
|
|
1181
|
+
return 'next';
|
|
1182
|
+
},
|
|
1183
|
+
]);
|
|
1184
|
+
}
|
|
1113
1185
|
if (source === 'notion') {
|
|
1114
1186
|
return await runSourcePromptSteps(initialState, (state) => [
|
|
1115
1187
|
...connectionSteps,
|
|
@@ -1355,6 +1427,12 @@ function sourceArgsFromExistingConnection(input) {
|
|
|
1355
1427
|
}
|
|
1356
1428
|
return sourceArgs;
|
|
1357
1429
|
}
|
|
1430
|
+
if (input.source === 'sigma') {
|
|
1431
|
+
sourceArgs.sourceUrl = stringField(input.connection.api_url) ?? undefined;
|
|
1432
|
+
sourceArgs.sourceClientId = stringField(input.connection.client_id) ?? undefined;
|
|
1433
|
+
sourceArgs.sourceClientSecretRef = stringField(input.connection.client_secret_ref) ?? undefined;
|
|
1434
|
+
return sourceArgs;
|
|
1435
|
+
}
|
|
1358
1436
|
if (input.source === 'gdrive') {
|
|
1359
1437
|
sourceArgs.gdriveServiceAccountKeyRef = stringField(input.connection.service_account_key_ref);
|
|
1360
1438
|
sourceArgs.gdriveFolderId = stringField(input.connection.folder_id);
|
|
@@ -1488,6 +1566,9 @@ function buildConnection(source, args) {
|
|
|
1488
1566
|
if (source === 'lookml') {
|
|
1489
1567
|
return buildLookmlConnection(args);
|
|
1490
1568
|
}
|
|
1569
|
+
if (source === 'sigma') {
|
|
1570
|
+
return buildSigmaConnection(args);
|
|
1571
|
+
}
|
|
1491
1572
|
if (source === 'notion') {
|
|
1492
1573
|
return buildNotionConnection(args);
|
|
1493
1574
|
}
|
|
@@ -1511,6 +1592,9 @@ async function validateSource(source, args, deps) {
|
|
|
1511
1592
|
if (source === 'lookml') {
|
|
1512
1593
|
return await (deps.validateLookml ?? defaultValidateLookml)(args.connection);
|
|
1513
1594
|
}
|
|
1595
|
+
if (source === 'sigma') {
|
|
1596
|
+
return await (deps.validateSigma ?? defaultValidateSigma)(args.connection);
|
|
1597
|
+
}
|
|
1514
1598
|
if (source === 'notion') {
|
|
1515
1599
|
return await (deps.validateNotion ?? defaultValidateNotion)(args.connection);
|
|
1516
1600
|
}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sigma_ingest
|
|
3
|
+
description: Extract durable ktx wiki knowledge from staged Sigma data model specs and workbook summaries. Load for WorkUnits with unitKey sigma-data-models or sigma-workbooks.
|
|
4
|
+
callers: [memory_agent]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Sigma Ingest
|
|
8
|
+
|
|
9
|
+
Sigma ingest turns staged data model specs and workbook summaries into durable ktx wiki knowledge. The deterministic `project()` step has already written semantic-layer YAML for all warehouse-table data model elements before this skill runs — do not re-write those SL sources.
|
|
10
|
+
|
|
11
|
+
## Work unit structure
|
|
12
|
+
|
|
13
|
+
Sigma produces at minimum two work units per ingest run:
|
|
14
|
+
|
|
15
|
+
- `sigma-data-models` or `sigma-data-models-N`
|
|
16
|
+
- `rawFiles`: `data-models/<id>.json` files (one per data model in this batch)
|
|
17
|
+
- `peerFileIndex`: `workbooks/<id>.json` files + `sigma-manifest.json` + `sigma-projection-config.json`
|
|
18
|
+
- When the workspace has more than 50 data models, split into batches: `sigma-data-models-0`, `sigma-data-models-1`, … with `displayLabel` like `"Sigma: data models (1/8)"`. When ≤50 data models, the unitKey is simply `sigma-data-models` with no suffix.
|
|
19
|
+
- `sigma-workbooks` or `sigma-workbooks-N`
|
|
20
|
+
- `rawFiles`: `workbooks/<id>.json` files (one per workbook in this batch)
|
|
21
|
+
- `peerFileIndex`: `data-models/<id>.json` files + `sigma-manifest.json` + `sigma-projection-config.json`
|
|
22
|
+
- When the workspace has more than 2000 workbooks, split into batches: `sigma-workbooks-0`, `sigma-workbooks-1`, … with `displayLabel` like `"Sigma: workbooks (1/4)"`. When ≤2000 workbooks, the unitKey is simply `sigma-workbooks` with no suffix.
|
|
23
|
+
|
|
24
|
+
`sigma-manifest.json` and `sigma-projection-config.json` are never in `rawFiles`. They live at the staged dir root and always appear in `peerFileIndex`.
|
|
25
|
+
|
|
26
|
+
## Staged file shapes
|
|
27
|
+
|
|
28
|
+
**`data-models/<id>.json`** — one per data model (in `rawFiles` for data-model units):
|
|
29
|
+
```json
|
|
30
|
+
{
|
|
31
|
+
"sigmaId": "abc-123",
|
|
32
|
+
"name": "Revenue Model",
|
|
33
|
+
"path": "Finance/Revenue Model",
|
|
34
|
+
"latestVersion": 3,
|
|
35
|
+
"updatedAt": "2026-01-15T00:00:00Z",
|
|
36
|
+
"isArchived": false,
|
|
37
|
+
"spec": {
|
|
38
|
+
"name": "Revenue Model",
|
|
39
|
+
"pages": [{
|
|
40
|
+
"id": "p1",
|
|
41
|
+
"name": "Main",
|
|
42
|
+
"elements": [{
|
|
43
|
+
"id": "elem1",
|
|
44
|
+
"kind": "table",
|
|
45
|
+
"name": "Opportunities",
|
|
46
|
+
"hidden": false,
|
|
47
|
+
"source": {
|
|
48
|
+
"kind": "warehouse-table",
|
|
49
|
+
"connectionId": "<sigma-internal-uuid>",
|
|
50
|
+
"path": ["DATABASE", "SCHEMA", "OPPORTUNITIES"]
|
|
51
|
+
},
|
|
52
|
+
"columns": [
|
|
53
|
+
{ "id": "c1", "name": "Deal Amount", "formula": "[OPPORTUNITIES/Amount]", "description": "Net contract value in USD" },
|
|
54
|
+
{ "id": "c2", "name": "Total ARR", "formula": "Sum([OPPORTUNITIES/ARR])", "description": "Annualised recurring revenue" }
|
|
55
|
+
]
|
|
56
|
+
}]
|
|
57
|
+
}]
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
`source.kind` discriminates:
|
|
63
|
+
- `warehouse-table` — element maps directly to a warehouse table. Has `connectionId` and `path` (array of path segments forming the fully-qualified table name). `project()` writes an SL source when `connectionMappings` covers this `connectionId`.
|
|
64
|
+
- `table` — element is a derived view layered on top of another element; identified by `source.elementId`. No warehouse path. Wiki-only.
|
|
65
|
+
|
|
66
|
+
**`workbooks/<id>.json`** — one per workbook, in `rawFiles` for workbook units (summary only; no spec endpoint exists):
|
|
67
|
+
```json
|
|
68
|
+
{
|
|
69
|
+
"sigmaId": "wb-abc",
|
|
70
|
+
"name": "ARR Tracker",
|
|
71
|
+
"path": "Finance/Dashboards",
|
|
72
|
+
"latestVersion": 2,
|
|
73
|
+
"updatedAt": "2026-01-16T00:00:00Z",
|
|
74
|
+
"isArchived": false,
|
|
75
|
+
"workbookUrlId": "57a96EMo3G...",
|
|
76
|
+
"description": "Tracks ARR by segment and cohort for the finance team"
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**Peer files (available via `peerFileIndex`, not `rawFiles`):**
|
|
81
|
+
|
|
82
|
+
**`sigma-manifest.json`** — fetch summary; use for provenance only.
|
|
83
|
+
|
|
84
|
+
**`sigma-projection-config.json`** — written by `fetch()`, contains two fields the skill must read:
|
|
85
|
+
|
|
86
|
+
- `connectionMappings`: `{sigmaInternalUuid: ktxWarehouseConnectionId}`. Use the mapped warehouse connection ID for `entity_details` when verifying warehouse identifiers found in data model specs.
|
|
87
|
+
- `workbookFilter`: the filter settings that were active when workbooks were last fetched:
|
|
88
|
+
- `includeArchived` (default `false`) — when `false`, archived workbooks are not in `workbooks/`; `isArchived: true` files will only appear when this was `true`.
|
|
89
|
+
- `includeExplorations` (default `false`) — when `false`, exploration-type workbooks (unsaved analyses) are excluded; treat present workbooks as intentional, curated reports.
|
|
90
|
+
- `updatedSince` (optional ISO 8601 string) — when set, only workbooks updated on or after this date are staged; the set is a recent-changes slice, not the full workspace. Do not infer that absent workbooks were deleted.
|
|
91
|
+
|
|
92
|
+
`sigma-manifest.json` also reflects any active `dataModelFilter`. When `dataModelFilter.updatedSince` was set during fetch, `dataModelCount` reflects only matching models, not the full workspace. Do not infer that absent data models were deleted.
|
|
93
|
+
|
|
94
|
+
Read `sigma-projection-config.json` first and keep `workbookFilter` in scope while processing the WorkUnit.
|
|
95
|
+
|
|
96
|
+
## Required workflow
|
|
97
|
+
|
|
98
|
+
1. Read every `rawFiles` entry for the WorkUnit.
|
|
99
|
+
2. Read `sigma-projection-config.json` from the staged dir to get `connectionMappings`.
|
|
100
|
+
3. For each data model file: extract business semantics from element names, column descriptions, and the domain context of the model. Skip hidden elements and hidden columns.
|
|
101
|
+
4. For each workbook file: extract business domain knowledge from the name and description. When `workbookFilter.updatedSince` is set, treat the staged set as a recent-changes slice — absent workbooks were not deleted, they were simply outside the filter window.
|
|
102
|
+
5. Use `discover_data` before writing to find existing wiki pages on the same topic.
|
|
103
|
+
6. Write wiki candidates with `context_candidate_write`. Do not call `wiki_write` directly from a Sigma WorkUnit; Stage 4 reconciliation promotes candidates.
|
|
104
|
+
7. Do not write or edit SL sources. The `project()` step owns all SL output for Sigma.
|
|
105
|
+
|
|
106
|
+
## Identifier Verification Protocol
|
|
107
|
+
|
|
108
|
+
Before writing a wiki page or SL source on any topic:
|
|
109
|
+
|
|
110
|
+
1. `discover_data({query: "<topic>"})` - see what wikis, SL sources, and raw
|
|
111
|
+
tables already exist. Prefer updating existing pages over creating new ones.
|
|
112
|
+
|
|
113
|
+
Before emitting any `schema.table` or `schema.table.column` into a wiki body,
|
|
114
|
+
SL source, `tables:` frontmatter, `sl_refs`, or `emit_unmapped_fallback`:
|
|
115
|
+
|
|
116
|
+
2. `entity_details({connectionId, targets: [{display: "<identifier>"}]})` -
|
|
117
|
+
confirm the identifier resolves; inspect native types, FK/PK, and
|
|
118
|
+
sampleValues. Use the warehouse `connectionId` from `connectionMappings` in
|
|
119
|
+
`sigma-projection-config.json`, not the Sigma connection ID. If
|
|
120
|
+
`connectionMappings` has no entry for the element's `source.connectionId`,
|
|
121
|
+
skip `entity_details` — there is no mapped warehouse to verify against —
|
|
122
|
+
and wrap any identifier references with `[unverified - from <rawPath>]`.
|
|
123
|
+
3. For literal values from the source, such as status codes or plan tiers,
|
|
124
|
+
check whether they appear in `entity_details` sampleValues for the relevant
|
|
125
|
+
column. If sampleValues is short or the sample may have missed real values,
|
|
126
|
+
run a `sql_execution` probe with the same warehouse connection id:
|
|
127
|
+
`sql_execution({connectionId, sql: "SELECT DISTINCT <col> FROM <ref> LIMIT 50"})`.
|
|
128
|
+
4. If the candidate identifier still does not resolve, do one of:
|
|
129
|
+
- Use `sql_execution({connectionId, sql: "SELECT 1 FROM <ref> LIMIT 0"})`.
|
|
130
|
+
If it errors, the identifier is fictional.
|
|
131
|
+
- Wrap the identifier in `[unverified - from <rawPath>]` in the wiki body,
|
|
132
|
+
citing the exact raw path that mentioned it.
|
|
133
|
+
- When recording `emit_unmapped_fallback` with `no_physical_table`, include
|
|
134
|
+
the failing probe error in `clarification`.
|
|
135
|
+
5. Never copy `<schema>.<table>` placeholder strings from these instructions
|
|
136
|
+
into output.
|
|
137
|
+
|
|
138
|
+
## Data model elements
|
|
139
|
+
|
|
140
|
+
### Warehouse-table elements (`source.kind === "warehouse-table"`)
|
|
141
|
+
|
|
142
|
+
`project()` writes an SL source for a warehouse-table element **only when** the element's `source.connectionId` has an entry in `connectionMappings`. When no mapping exists, no SL source is written and the element is wiki-only.
|
|
143
|
+
|
|
144
|
+
To determine whether an SL source exists: check whether `connectionMappings[element.source.connectionId]` resolves. If it does, use `sl_discover` to find the source by its slugified name (`<dataModelName>_<elementName>`), then:
|
|
145
|
+
|
|
146
|
+
- Read the existing SL source with `sl_read_source` to understand what columns and measures are captured.
|
|
147
|
+
- Write a wiki candidate about the business domain if the element name, column descriptions, or data model description reveals durable knowledge not already in the wiki.
|
|
148
|
+
- `sl_refs` in the wiki candidate should point to the already-written SL source name.
|
|
149
|
+
|
|
150
|
+
If `connectionMappings` has no entry for the element's `source.connectionId`, treat the element as wiki-only — do not attempt `sl_discover` or `sl_read_source` for it, as no source was written.
|
|
151
|
+
|
|
152
|
+
### Joins within a data model
|
|
153
|
+
|
|
154
|
+
Joins are not projected in v1; `joins: []` is always written by `project()`. `Lookup()` formulas may be described in wiki prose instead.
|
|
155
|
+
|
|
156
|
+
### Non-warehouse elements (`source.kind === "table"`)
|
|
157
|
+
|
|
158
|
+
These reference another element by `elementId` — they are derived views layered on top of a warehouse-table element. They have no warehouse path of their own. Do not attempt SL writes for these elements. They may produce wiki candidates if their column names or descriptions reveal business semantics not captured by the underlying warehouse-table element.
|
|
159
|
+
|
|
160
|
+
## Workbooks
|
|
161
|
+
|
|
162
|
+
Workbooks have summary metadata only. There is no spec endpoint.
|
|
163
|
+
|
|
164
|
+
Extract business domain knowledge from:
|
|
165
|
+
- `name`: the workbook's primary topic (e.g. "ARR Tracker" → ARR tracking concepts)
|
|
166
|
+
- `description`: business context and intended audience
|
|
167
|
+
- `path`: team or functional area (e.g. `Finance/Dashboards`)
|
|
168
|
+
|
|
169
|
+
Write wiki candidates when the name or description reveals a reusable business concept, metric definition, or domain convention. Write one candidate per distinct concept, not one per workbook.
|
|
170
|
+
|
|
171
|
+
Skip workbooks whose name or description contains no durable business semantics (e.g. "Untitled Workbook", "Test Dashboard").
|
|
172
|
+
|
|
173
|
+
## Capture rules
|
|
174
|
+
|
|
175
|
+
Write wiki candidates for:
|
|
176
|
+
- Metric definitions mentioned in element names or column descriptions (e.g. "Net ARR", "Churned MRR")
|
|
177
|
+
- Domain conventions such as cohort definitions, segment taxonomies, or fiscal calendar rules
|
|
178
|
+
- Relationships between business entities revealed by data model joins
|
|
179
|
+
|
|
180
|
+
Skip:
|
|
181
|
+
- Visualization settings, layout, colors, chart types
|
|
182
|
+
- Owner names, folder paths, and version numbers as wiki narrative
|
|
183
|
+
- Hidden elements and hidden columns
|
|
184
|
+
- Data model names that are purely technical with no business meaning
|
|
185
|
+
- When `workbookFilter.includeExplorations` is `false` (the default), all staged workbooks are intentional reports — no extra exploration filter needed. When it is `true`, workbooks without a description or with a generic auto-generated name are likely ephemeral explorations; skip those.
|
|
186
|
+
|
|
187
|
+
## Usage signals
|
|
188
|
+
|
|
189
|
+
Sigma workbooks carry `latestVersion` but no usage counts. Treat a higher `latestVersion` as weak evidence of continued maintenance; do not include version numbers in wiki prose.
|