farseer-cli 1.13.0 → 1.14.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 +23 -8
- package/dist/commands/pipeline.js +158 -0
- package/dist/commands/pipeline.js.map +7 -0
- package/dist/commands/variables.js +17 -8
- package/dist/commands/variables.js.map +2 -2
- package/dist/index.js +40 -46
- package/dist/index.js.map +2 -2
- package/dist/mcp/prompts/workflows.js +13 -68
- package/dist/mcp/prompts/workflows.js.map +2 -2
- package/dist/mcp/resources/documentation.js +14 -0
- package/dist/mcp/resources/documentation.js.map +2 -2
- package/dist/mcp/server.js +14 -2
- package/dist/mcp/server.js.map +2 -2
- package/dist/mcp/skills.js +59 -0
- package/dist/mcp/skills.js.map +7 -0
- package/dist/mcp/tools/appTools.js +4 -0
- package/dist/mcp/tools/appTools.js.map +2 -2
- package/dist/mcp/tools/dataTools.js +2 -0
- package/dist/mcp/tools/dataTools.js.map +2 -2
- package/dist/mcp/tools/modelTools.js +6 -41
- package/dist/mcp/tools/modelTools.js.map +2 -2
- package/dist/mcp/tools/pipelineContract.js +317 -0
- package/dist/mcp/tools/pipelineContract.js.map +7 -0
- package/dist/mcp/tools/pipelineTools.js +111 -0
- package/dist/mcp/tools/pipelineTools.js.map +7 -0
- package/dist/mcp/tools/runTools.js +2 -0
- package/dist/mcp/tools/runTools.js.map +2 -2
- package/dist/mcp/tools/syncTools.js +4 -0
- package/dist/mcp/tools/syncTools.js.map +2 -2
- package/dist/pipeline/compatibility.js +53 -0
- package/dist/pipeline/compatibility.js.map +7 -0
- package/dist/pipeline/connect.js +139 -0
- package/dist/pipeline/connect.js.map +7 -0
- package/dist/pipeline/create.js +158 -0
- package/dist/pipeline/create.js.map +7 -0
- package/dist/pipeline/errors.js +45 -0
- package/dist/pipeline/errors.js.map +7 -0
- package/dist/pipeline/generated-reference.json +115 -0
- package/dist/pipeline/guide.js +33 -0
- package/dist/pipeline/guide.js.map +7 -0
- package/dist/pipeline/init.js +204 -0
- package/dist/pipeline/init.js.map +7 -0
- package/dist/pipeline/operations.js +103 -0
- package/dist/pipeline/operations.js.map +7 -0
- package/dist/pipeline/query.js +103 -0
- package/dist/pipeline/query.js.map +7 -0
- package/dist/pipeline/queryWorker.js +119 -0
- package/dist/pipeline/queryWorker.js.map +7 -0
- package/dist/pipeline/readiness.js +55 -0
- package/dist/pipeline/readiness.js.map +7 -0
- package/dist/pipeline/reference.js +72 -0
- package/dist/pipeline/reference.js.map +7 -0
- package/dist/pipeline/requests.js +122 -0
- package/dist/pipeline/requests.js.map +7 -0
- package/dist/pipeline/runArguments.js +68 -0
- package/dist/pipeline/runArguments.js.map +7 -0
- package/dist/pipeline/runtime.js +105 -0
- package/dist/pipeline/runtime.js.map +7 -0
- package/dist/pipeline/service.js +967 -0
- package/dist/pipeline/service.js.map +7 -0
- package/dist/services/agentApprovalFetch.js +86 -0
- package/dist/services/agentApprovalFetch.js.map +7 -0
- package/dist/services/configService.js +29 -0
- package/dist/services/configService.js.map +2 -2
- package/dist/services/credentials.js +2 -0
- package/dist/services/credentials.js.map +2 -2
- package/dist/services/farseerService.js +10 -3
- package/dist/services/farseerService.js.map +2 -2
- package/dist/services/preflight.js +4 -0
- package/dist/services/preflight.js.map +2 -2
- package/dist/services/syncService.js +6 -0
- package/dist/services/syncService.js.map +2 -2
- package/dist/skills/pipeline.js +71 -0
- package/dist/skills/pipeline.js.map +7 -0
- package/dist/utils/helpers.js +2 -1
- package/dist/utils/helpers.js.map +2 -2
- package/dist/utils/variableValues.js +78 -0
- package/dist/utils/variableValues.js.map +7 -0
- package/docs/pipeline-client-guide.md +67 -0
- package/docs/pipeline-reference.md +2064 -0
- package/package.json +5 -1
- package/skills/pipeline-authoring/SKILL.md +95 -0
- package/skills/pipeline-authoring/practices.md +325 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
{
|
|
2
|
+
"formatVersion": 1,
|
|
3
|
+
"engineVersion": "2.9.1",
|
|
4
|
+
"engineProfile": "2.9",
|
|
5
|
+
"runnerImage": "runner-python-simple-pipelines:1.12.2",
|
|
6
|
+
"sourceHashes": {
|
|
7
|
+
"data-platform/packages/simple-pipelines/src/farseer_simple_pipelines/schema.py": "b495e69d128ca994c0972ad20ff1666b73382b8b6ac3211f45f7fb11bf4c9f53",
|
|
8
|
+
"data-platform/packages/simple-pipelines/pyproject.toml": "9a93f1cae6eedf2c09246bc9acb90099435074181314e82ab84071c7f73aa5f0",
|
|
9
|
+
"tools/pipeline/generate_docs.py": "3a3639b1421f06ed816a35def8861fc42104324eff3c38892ae8367bf877e4cc",
|
|
10
|
+
"runner-images/VERSION": "39ff53dce98b1cf6b5738dfb096b827a6575a540767b294310c4becc61e987c3",
|
|
11
|
+
"runner-images/python-simple-pipelines/pyproject.toml": "1085777b114cc14eff26dec494ee790a968ce9a7830db3afde7245fd6abeb95f",
|
|
12
|
+
"tools/pipeline/examples/FarseerFilesExtractConfig.yaml": "107a9c45d2ad7c40e84e2bd3d0228a4c55547e8f2fbefcc947d93d4bd6dc9231",
|
|
13
|
+
"tools/pipeline/examples/LoadCellsConfig.yaml": "2b56bd84e35765b616916c21c98fd306e2b93127358979777a77083991ac8bf1",
|
|
14
|
+
"tools/pipeline/examples/TransformConfig.yaml": "bd2b590ccf262e73ff83de02b146e24105c416848f288e598e0563c0a145c5c6"
|
|
15
|
+
},
|
|
16
|
+
"notice": "Generated from Pydantic's validation schema using YAML aliases. This describes rendered dataset definitions, not discovery/template directives. Descriptions come from the models; Python validators may impose additional cross-field rules. Read the method guide for the supported pipeline subset. Optional fields without a literal default may use a default factory. Runtime-derived fields are listed separately and must not be authored in YAML.",
|
|
17
|
+
"topics": {
|
|
18
|
+
"DatasetDefinition": "## DatasetDefinition\n\nValidated representation of a single dataset YAML file.\n\n- Set exactly the configuration block matching type: extract, transform, load or export.\n- For load/export, deps must match the explicitly referenced source_dataset names in both directions. Use qualified names verbatim.\n- Authored pipelines are validated before any source is read: sql_file and farseer_credentials are refused; read the method guide before using this full engine reference.\n- Steps run in dependency order, and steps at the same depth run in name order, so a quality check or reconciliation runs before a load only if the load's source dataset depends on it.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `schema_version` | integer | no | `1` | minimum=`1` |\n| `name` | string | yes | none | |\n| `type` | [StepType](#steptype) | yes | none | |\n| `deps` | array of string | no | none | |\n| `description` | string | no | `\"\"` | |\n| `extract` | [ExtractConfig](#extractconfig) or null | no | `null` | |\n| `transform` | [TransformConfig](#transformconfig) or null | no | `null` | |\n| `load` | [LoadConfig](#loadconfig) or null | no | `null` | |\n| `export` | [ExportConfig](#exportconfig) or null | no | `null` | |\n| `schema` | [DataSchema](#dataschema) or null | no | `null` | |\n| `quality_rules` | array of [QualityRuleEntry](#qualityruleentry) | no | none | |\n| `write_mode` | [WriteMode](#writemode) | no | `\"overwrite\"` | |\n| `merge_keys` | array of string | no | none | |\n\nRuntime-derived; do not set in YAML: `qualified_name`, `namespace`, `source_path`, `render_context`.\n",
|
|
19
|
+
"BusinessCentralExtractConfig": "## BusinessCentralExtractConfig\n\nExtraction settings for Microsoft Dynamics 365 Business Central.\n\nReads through the OData V4 API, authenticating with the OAuth2\nclient-credentials flow against Azure AD. Requires an Azure AD app\nregistration consented in the BC tenant (typical permission:\n`Dynamics 365 Business Central / app_access`). Credentials (`tenant_id`,\n`client_id`, `client_secret`) are supplied as YAML fields — typically\ntemplated via `{{ pipeline_args.NAME }}` so a Remote Job's secret\n`expectedArguments` flow through at discovery time.\n\nA BC URL is composed as:\n\n {api_base}/{bc_tenant_id}/{environment}/api/{publisher}/{api_group}/{api_version}/companies({company_guid})/{entity}\n\nThe four URL-path fields (`publisher`, `api_group`, `entity`,\n`api_version`) are kept separate so that authors can't accidentally\nglue them into a malformed path; the same structure also lets the\nextractor log one stable summary regardless of which entity is fetched.\n\n`bc_tenant_id` is the *BC* tenant GUID (the one that appears in the\nAPI URL) and may differ from `tenant_id` (the Azure AD tenant GUID\nused for the token endpoint), although in practice they are usually\nthe same.\n\n`filter` is an OData `$filter` expression (e.g.\n`\"postingDateYear eq 2025\"`) — server-side filtering, so it scales\nindependent of pagination. `select` projects a subset of fields\nserver-side; useful when the response payload is dominated by\ncolumns the pipeline does not need.\n\nPagination follows `@odata.nextLink` until exhausted. `page_size`\nis forwarded to BC as `?$top=` — leave unset to accept BC's default\n(20,000 rows per page); set it to a smaller value when running\nagainst a slow connection or to force a multi-page test on a small\nentity.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `bc_tenant_id` | string | yes | none | |\n| `environment` | string | yes | none | |\n| `publisher` | string | yes | none | |\n| `api_group` | string | yes | none | |\n| `company_guid` | string | yes | none | |\n| `entity` | string | yes | none | |\n| `api_version` | string | no | `\"v1.0\"` | |\n| `filter` | string or null | no | `null` | |\n| `select` | string or null | no | `null` | |\n| `page_size` | integer or null | no | `null` | integer: exclusiveMinimum=`0` |\n| `tenant_id` | string or null | no | `null` | |\n| `client_id` | string or null | no | `null` | |\n| `client_secret` | string or null | no | `null` | |\n",
|
|
20
|
+
"CSVWriteOptions": "## CSVWriteOptions\n\nOptions for DataFrame → CSV serialization on export.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `separator` | string | no | `\",\"` | |\n| `decimal` | string | no | `\".\"` | |\n| `encoding` | string | no | `\"utf-8\"` | |\n| `include_header` | boolean | no | `true` | |\n| `lineterminator` | string | no | `\"\\n\"` | minLength=`1` |\n",
|
|
21
|
+
"CellsOptions": "## CellsOptions\n\nPer-entry options for cell value import.\n\nRows that land on the same coordinates in one import are summed, so the\nsource should already hold one row per cell.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `overwrite_cells` | boolean | yes | none | true replaces the existing value of every coordinate in this import; cells for coordinates not in the import keep their values. false refuses the whole import if any target cell already holds a value, so a rerun fails. |\n| `import_zeros` | boolean | no | `true` | false drops rows whose value is 0, so a value that fell to zero keeps its old number. |\n| `create_missing_members` | boolean | no | `false` | When true, members that appear in mapped source columns but not in the model are created during the import. Fixed dimension members are not created: each must already exist, or be written by a dimension load earlier in the same run. |\n| `missing_member_policy` | `\"DISALLOW\"`, `\"USE_DEFAULT\"`, `\"SKIP_ROW\"` | no | `\"DISALLOW\"` | What happens to a source value a dimension does not have: DISALLOW fails the whole import, USE_DEFAULT books the row to the table's default member, SKIP_ROW drops the row without counting it. |\n| `labels` | array of string | no | none | Stored on the import job; the engine adds pipeline:<load qualified name>. undo_previous finds earlier imports by all of them, so name exactly the slice one run owns. |\n| `undo_previous` | boolean | no | `false` | After this import commits, undo every earlier import carrying all the same labels. Undo deletes that import's cells and never restores the values they replaced; a failed undo is only a warning. |\n| `review_gate` | [ReviewGateConfig](#reviewgateconfig) or null | no | `null` | |\n| `allow_empty` | boolean | no | `false` | true turns a source with zero rows into a no-op instead of an error. Mapped columns must still be present, and nothing is undone. |\n",
|
|
22
|
+
"ColumnSchema": "## ColumnSchema\n\nSchema definition for a single column.\n\n`quality_rules:` carries the column's single-column quality rules —\neach one applies to *this* column with no further reference needed.\nRelational rules (which span multiple columns) sit in the top-level\n`quality_rules:` block on the dataset, not here.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `name` | string | yes | none | |\n| `type` | `\"str\"`, `\"int\"`, `\"float\"`, `\"datetime\"`, `\"bool\"`, `\"list[str]\"` or null | no | `null` | |\n| `not_null` | boolean | no | `false` | |\n| `quality_rules` | array of [QualityRuleEntry](#qualityruleentry) | no | none | |\n",
|
|
23
|
+
"ConflictBehavior": "## ConflictBehavior\n\nHow the target should resolve an existing file at the destination path.\n\nMirrors Microsoft Graph's `@microsoft.graph.conflictBehavior` values\nsince SharePoint is the first target; other targets adapt to their\nown semantics (e.g. SFTP may have no equivalent of `rename`).\n\nValues: `\"replace\"`, `\"rename\"`, `\"fail\"`\n",
|
|
24
|
+
"Connection": "## Connection\n\nMaps a source column to a target dimension table (foreign key).\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `source_column` | string | yes | none | |\n| `target_dimension_table` | string | yes | none | |\n",
|
|
25
|
+
"CsvParseOptions": "## CsvParseOptions\n\ncsv-specific parse options (passed to `pd.read_csv`).\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `encoding` | string | no | `\"utf-8\"` | |\n| `separator` | string or null | no | `null` | |\n| `decimal` | string or null | no | `null` | |\n| `has_header` | boolean | no | `true` | |\n| `columns` | string or null | no | `null` | |\n",
|
|
26
|
+
"CustomField": "## CustomField\n\nMaps a DataFrame column to a CUSTOM column meta.\n\nEach imported cell receives the column's value in a per-cell JSON blob,\nkeyed by the column's header name (= `source_column`). Typical uses:\nsource-system IDs, processing notes, confidence scores.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `source_column` | string | yes | none | |\n",
|
|
27
|
+
"DataFormat": "## DataFormat\n\nValues: `\"parquet\"`, `\"csv\"`, `\"json\"`\n",
|
|
28
|
+
"DataSchema": "## DataSchema\n\nTop-level `schema:` block in a dataset YAML.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `columns` | array of [ColumnSchema](#columnschema) | yes | none | minItems=`1` |\n",
|
|
29
|
+
"DateColumn": "## DateColumn\n\nMaps a DataFrame column to a DATE attribute column on a RAMA dim table.\n\nValues are converted to Excel serial numbers at load time via\n`farseer_client.date_utils.to_excel_serial`.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `source_column` | string | yes | none | |\n| `target_dimension_table_column` | string | yes | none | |\n",
|
|
30
|
+
"DimensionTableEntryOptions": "## DimensionTableEntryOptions\n\nPer-entry options for one dimension-table sync (this table only).\n\nDistinct from `DimensionTableOptions`, which carries options for the\nwhole `model.load` call (all tables at once); these govern a single\ntable's source frame.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `allow_empty` | boolean | no | `false` | |\n",
|
|
31
|
+
"DimensionTableOptions": "## DimensionTableOptions\n\nShared options for dimension table sync (applies to all tables in one API call).\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `delete_missing` | boolean | no | `false` | |\n",
|
|
32
|
+
"DimensionTablesConfig": "## DimensionTablesConfig\n\nConfiguration for dimension member sync.\n\n`tables` lists the dimension tables to sync, each with its own\ndata source and column mapping. `options` applies to all tables\n(RAMA's model.load() processes them in a single API call).\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `options` | [DimensionTableOptions](#dimensiontableoptions) | no | none | |\n| `tables` | array of [LoadDimensionTableEntry](#loaddimensiontableentry) | yes | none | minItems=`1` |\n",
|
|
33
|
+
"ExportConfig": "## ExportConfig\n\nConfiguration for a `type: export` dataset step.\n\n`target` selects the destination system. The target-specific\nconfig block must match (e.g. `target: sharepoint` requires a\n`sharepoint:` section). Export steps are terminal sinks — no\ndownstream dataset depends on their output.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `target` | [ExportTarget](#exporttarget) | yes | none | |\n| `sharepoint` | [SharePointExportConfig](#sharepointexportconfig) or null | no | `null` | |\n| `farseer_files` | [FarseerFilesExportConfig](#farseerfilesexportconfig) or null | no | `null` | |\n| `allow_empty` | boolean | no | `false` | |\n",
|
|
34
|
+
"ExportFormat": "## ExportFormat\n\nValues: `\"csv\"`, `\"xlsx\"`, `\"parquet\"`\n",
|
|
35
|
+
"ExportTarget": "## ExportTarget\n\nValues: `\"sharepoint\"`, `\"farseer_files\"`\n",
|
|
36
|
+
"ExtractConfig": "## ExtractConfig\n\nConfiguration for a `type: extract` dataset step.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `type` | [ExtractType](#extracttype) | yes | none | |\n| `google_drive_public` | [GoogleDrivePublicExtractConfig](#googledrivepublicextractconfig) or null | no | `null` | |\n| `google_drive` | [GoogleDriveExtractConfig](#googledriveextractconfig) or null | no | `null` | |\n| `sharepoint` | [SharePointExtractConfig](#sharepointextractconfig) or null | no | `null` | |\n| `sql_database` | [SqlDatabaseExtractConfig](#sqldatabaseextractconfig) or null | no | `null` | |\n| `farseer` | [FarseerExtractConfig](#farseerextractconfig) or null | no | `null` | |\n| `business_central` | [BusinessCentralExtractConfig](#businesscentralextractconfig) or null | no | `null` | |\n| `tldv` | [TldvExtractConfig](#tldvextractconfig) or null | no | `null` | |\n| `intercom` | [IntercomExtractConfig](#intercomextractconfig) or null | no | `null` | |\n| `notion` | [NotionExtractConfig](#notionextractconfig) or null | no | `null` | |\n| `hubspot` | [HubspotExtractConfig](#hubspotextractconfig) or null | no | `null` | |\n| `sap_odata` | [SapOdataExtractConfig](#sapodataextractconfig) or null | no | `null` | |\n| `s3` | [S3ExtractConfig](#s3extractconfig) or null | no | `null` | |\n| `parse` | [ParseConfig](#parseconfig) | no | none | |\n| `optional` | boolean | no | `false` | When true, a source that does not exist (404, no such table, no such file) skips this dataset instead of failing the run. The skip propagates to every step that depends on it, loads and exports included, and the run still finishes successfully. Network errors, authentication failures, timeouts and 5xx responses still fail the run. |\n",
|
|
37
|
+
"ExtractType": "## ExtractType\n\nValues: `\"google_drive_public\"`, `\"google_drive\"`, `\"sharepoint\"`, `\"sql_database\"`, `\"farseer\"`, `\"business_central\"`, `\"tldv\"`, `\"intercom\"`, `\"notion\"`, `\"hubspot\"`, `\"sap_odata\"`, `\"s3\"`\n",
|
|
38
|
+
"FarseerDatasetsExtractConfig": "## FarseerDatasetsExtractConfig\n\n`extract.farseer.source: datasets` — read a versioned dataset.\n\nReads from the Labs Datasets API: the symmetric counterpart to\n`DatasetDataStore` writes — same control-plane API, same GCS data-plane,\njust the read half.\n\n`qualified_name` is the dataset's registered name (the writer's\nqualified name maps 1:1 to the API `name` field). `version_id`\npins the read to a specific completed version for reproducibility;\nwhen omitted the extractor reads the dataset's currently promoted\nversion. An unpromoted dataset (created but never promoted) is\ntreated as a missing source so `optional: true` can absorb it.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `qualified_name` | string | yes | none | |\n| `version_id` | string or null | no | `null` | |\n",
|
|
39
|
+
"FarseerDimensionsConnection": "## FarseerDimensionsConnection\n\nProjects a foreign-key column on a dim table to a DataFrame column.\n\nInverse of the load side's `dimension_tables.tables[].mapping.connections`.\nThe DataFrame cell receives a list of connected-member names\n(`/model/export` resolves FK ids to names server-side via\n`PK_MEMBER_EXTRACTOR`).\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `source_dimension_table` | string | yes | none | |\n| `target_column` | string | yes | none | |\n",
|
|
40
|
+
"FarseerDimensionsDateColumn": "## FarseerDimensionsDateColumn\n\nProjects a DATE attribute column on a dim table to a DataFrame column.\n\nThe DataFrame value is the raw Excel serial number Rama stores — days\nsince 1899-12-30 with the 1900 leap-year bug preserved. See\n`clients/python/src/farseer_client/date_utils.py` for the formula\n(only the forward conversion `to_excel_serial` ships in the client\ntoday) if a downstream transform needs a Python date.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `source_dimension_table_column` | string | yes | none | |\n| `target_column` | string | yes | none | |\n",
|
|
41
|
+
"FarseerDimensionsExtractConfig": "## FarseerDimensionsExtractConfig\n\n`extract.farseer.source: dimensions` — read members of one dim table.\n\nInverse of the `dimension_tables.tables[]` block on\n`FarseerLoadConfig`. One step → one DataFrame of members; to read\nseveral dim tables, declare multiple extracts (`expand:` templates them).\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `source_dimension_table` | string | yes | none | |\n| `mapping` | [FarseerDimensionsMapping](#farseerdimensionsmapping) | yes | none | |\n",
|
|
42
|
+
"FarseerDimensionsFileColumn": "## FarseerDimensionsFileColumn\n\nProjects a FILE attribute column on a dim table to two DataFrame columns.\n\nRama stores FILE values as `{\"farseerFileId\", \"filename\"}` JSON strings\n(the same shape the load side's `file_columns` writes). The extractor\nparses the JSON and fans each FILE column into two output columns: a UUID\nfile id and the display filename.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `source_dimension_table_column` | string | yes | none | |\n| `target_file_id_column` | string | yes | none | |\n| `target_filename_column` | string | yes | none | |\n",
|
|
43
|
+
"FarseerDimensionsMapping": "## FarseerDimensionsMapping\n\nProjects Farseer dimension-member fields onto DataFrame columns.\n\nMirrors `dimension_tables.tables[].mapping` on the load side with the\ndata direction flipped: where load writes `source_*_column` (DataFrame\n→ Rama), extract writes `target_*_column` (Rama → DataFrame). Reserved\nRama fields (Name, Description, Order, Active) are scalars under\n`mapping:`; columns the author can name (connections + typed attribute\ncolumns) are lists of source/target pairs.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `target_primary_key_column` | string | yes | none | |\n| `target_description_column` | string or null | no | `null` | |\n| `target_order_column` | string or null | no | `null` | |\n| `target_active_column` | string or null | no | `null` | |\n| `connections` | array of [FarseerDimensionsConnection](#farseerdimensionsconnection) | no | none | |\n| `text_columns` | array of [FarseerDimensionsTextColumn](#farseerdimensionstextcolumn) | no | none | |\n| `number_columns` | array of [FarseerDimensionsNumberColumn](#farseerdimensionsnumbercolumn) | no | none | |\n| `date_columns` | array of [FarseerDimensionsDateColumn](#farseerdimensionsdatecolumn) | no | none | |\n| `file_columns` | array of [FarseerDimensionsFileColumn](#farseerdimensionsfilecolumn) | no | none | |\n",
|
|
44
|
+
"FarseerDimensionsNumberColumn": "## FarseerDimensionsNumberColumn\n\nProjects a NUMBER attribute column on a dim table to a DataFrame column.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `source_dimension_table_column` | string | yes | none | |\n| `target_column` | string | yes | none | |\n",
|
|
45
|
+
"FarseerDimensionsTextColumn": "## FarseerDimensionsTextColumn\n\nProjects a TEXT attribute column on a dim table to a DataFrame column.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `source_dimension_table_column` | string | yes | none | |\n| `target_column` | string | yes | none | |\n",
|
|
46
|
+
"FarseerExtractConfig": "## FarseerExtractConfig\n\n`extract.type: farseer` — multi-source family.\n\n`source:` picks which Farseer concept to extract from; the\nmatching inner block carries source-specific config. Cross-tenant\ncredentials are shared across all sources via `farseer_credentials:`.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `source` | [FarseerSource](#farseersource) | yes | none | |\n| `variables` | [FarseerVariablesExtractConfig](#farseervariablesextractconfig) or null | no | `null` | |\n| `files` | [FarseerFilesExtractConfig](#farseerfilesextractconfig) or null | no | `null` | |\n| `imports` | [FarseerImportsExtractConfig](#farseerimportsextractconfig) or null | no | `null` | |\n| `dimensions` | [FarseerDimensionsExtractConfig](#farseerdimensionsextractconfig) or null | no | `null` | |\n| `datasets` | [FarseerDatasetsExtractConfig](#farseerdatasetsextractconfig) or null | no | `null` | |\n| `farseer_credentials` | [TenantCredentialsConfig](#tenantcredentialsconfig) or null | no | `null` | |\n",
|
|
47
|
+
"FarseerFilesExportConfig": "## FarseerFilesExportConfig\n\nFarseer Files export target: the source DataFrame as a user-chosen file.\n\nWrites to the tenant's own Files folder (the tree shown in the UI's left\nnav). The write-side mirror of `extract.farseer source: files`.\n\nDistinct from the `Data/` folder the `farseer_files` *data store*\nwrites intermediate step outputs to: that location is addressed by\nqualified name and is meant for developers / product-services, whereas\nthis target writes a single, user-readable report to a path the author\npicks (`file_path`, relative to the Files root — the leading `Files/`\nis implied, exactly like the extractor's `file:`).\n\n**Parquet only — deliberately.** This target exists so the exported file\nfaithfully reproduces the in-memory DataFrame, and parquet is the only\nformat that does: it stores dtypes, float precision, null-vs-NaN,\ndatetimes, and leading-zero string codes in the file's own metadata, so\nthe round-trip is lossless. CSV would coerce every value back to text —\nthe classic `0000042100` account-code → `int64` corruption the\nextract side already sidesteps by persisting typed CSVs as parquet — and\nXLSX would impose Excel's numeric model (int/float collapse, >15-digit\nprecision loss, dropped leading zeros). Because the Farseer Files UI\npreviews parquet natively, reading the typed schema (`hyparquet` in\n`FilePreview`), the author sees exactly the DataFrame — so parquet is\nboth the faithful *and* the user-readable choice, and there is no reason\nto ship a lossy one. `format: csv | xlsx` can be added later as an\nopt-in for the \"download and open outside Farseer\" case, with the\nlossiness documented at that point.\n\n`source_dataset` names the single dep whose DataFrame is written to the\nfile -- the same source-naming field SharePoint export uses. An export\nwrites exactly one dataset to one file, so the step's single dep must\nequal `source_dataset` (enforced on `DatasetDefinition`).\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `source_dataset` | string | yes | none | |\n| `file_path` | string | yes | none | Path under Files, ending in the file name. The folder must already exist: the export does not create folders. |\n| `conflict_behavior` | [ConflictBehavior](#conflictbehavior) | no | `\"fail\"` | |\n| `farseer_credentials` | [TenantCredentialsConfig](#tenantcredentialsconfig) or null | no | `null` | |\n",
|
|
48
|
+
"FarseerFilesExtractConfig": "## FarseerFilesExtractConfig\n\n`extract.farseer.source: files` — pick a file from Farseer Files.\n\nReads from the source tenant's store. Specify exactly one of `file`\n(slash-separated path under Files) or `file_id` (opaque ID). Cross-tenant\naccess lives on `FarseerExtractConfig`.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `file` | string or null | no | `null` | |\n| `file_id` | string or null | no | `null` | |\n\n### Example\n\n```yaml\n# Models/sales_raw.yaml: a file's name must match its `name:`.\n# Reads one month's CSV from Files. The run argument picks the file, so each run\n# reads its own month.\nname: sales_raw\ntype: extract\nextract:\n type: farseer\n farseer:\n source: files\n files:\n file: \"Imports/{{ pipeline_args.SOURCE_FILE }}\"\n parse:\n format: csv\n```\n",
|
|
49
|
+
"FarseerImportsExtractConfig": "## FarseerImportsExtractConfig\n\n`extract.farseer.source: imports` — source-row audit of a variable.\n\nOne row per `import_cell`, preserving the `description` set when each\nrow was imported.\n\nCounterpart to `FarseerVariablesExtractConfig`, which\naggregates to one row per Rama cell (current state). Same variable\nsurface (`variable` + `dimensions` + `filters`) with an\nadditional `target_description_column` for the per-row description;\ncells without import provenance (manual entries, calculated cells)\nare excluded. This is the audit view: one row per imported cell with\nthe description it was imported with. For the current value of each\ncell, use `source: variables`.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `variable` | string | yes | none | |\n| `target_value_column` | string | yes | none | |\n| `target_description_column` | string | yes | none | |\n| `dimensions` | array of [FarseerVariablesDimensionMapping](#farseervariablesdimensionmapping) | yes | none | minItems=`1` |\n| `filters` | array of [FarseerVariablesFilter](#farseervariablesfilter) | no | none | |\n",
|
|
50
|
+
"FarseerLoadConfig": "## FarseerLoadConfig\n\n`load.target: farseer` — push cells and/or dimension members.\n\nWrites into a Farseer tenant's model.\nOne atomic `/model/load` call can carry both `dimension_tables`\n(member sync) and `cells` (variable-cell import); at least one\nis required, and dim tables sync before cells when both are set.\nNo inner `entity:` discriminator because Farseer has a single\nload operation; if a second mode appears later it can add one.\nCross-tenant pushes are configured via `farseer_credentials:`.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `dimension_tables` | [DimensionTablesConfig](#dimensiontablesconfig) or null | no | `null` | |\n| `cells` | array of [LoadCellsConfig](#loadcellsconfig) | no | none | |\n| `farseer_credentials` | [TenantCredentialsConfig](#tenantcredentialsconfig) or null | no | `null` | |\n",
|
|
51
|
+
"FarseerSource": "## FarseerSource\n\nSub-discriminator on `extract.farseer.source`.\n\nValues: `\"variables\"`, `\"files\"`, `\"imports\"`, `\"dimensions\"`, `\"datasets\"`\n",
|
|
52
|
+
"FarseerVariablesDimensionMapping": "## FarseerVariablesDimensionMapping\n\nMaps a Farseer dim table to an output column on a variables extract.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `source_dimension_table` | string | yes | none | |\n| `target_column` | string | yes | none | |\n",
|
|
53
|
+
"FarseerVariablesExtractConfig": "## FarseerVariablesExtractConfig\n\n`extract.farseer.source: variables` — read one variable's cells.\n\nAggregated cells, inverse of the `cells:` block on `FarseerLoadConfig`.\nReturns cells as currently persisted, not re-evaluated: one row per cell\nthat exists, with one output column per entry in `dimensions` (time tables\nsuch as `Years` and `Months` included, when the variable has them) and the\nvalue in `target_value_column`. `filters` restrict members: OR within one\nentry, AND across entries. One variable per step; to read several,\ndeclare several extracts and combine them in a transform.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `variable` | string | yes | none | |\n| `target_value_column` | string | yes | none | |\n| `dimensions` | array of [FarseerVariablesDimensionMapping](#farseervariablesdimensionmapping) | yes | none | minItems=`1` |\n| `filters` | array of [FarseerVariablesFilter](#farseervariablesfilter) | no | none | |\n",
|
|
54
|
+
"FarseerVariablesFilter": "## FarseerVariablesFilter\n\nKeeps only cells whose member for `dimension_table` is in `members`.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `dimension_table` | string | yes | none | |\n| `members` | array of string | yes | none | minItems=`1` |\n",
|
|
55
|
+
"FileColumn": "## FileColumn\n\nMaps two DataFrame columns to a FILE attribute column on a RAMA dim table.\n\nRAMA stores FILE cell values as `{farseerFileId, filename}` JSON strings —\nthe UI uses the filename to render the cell. The load step combines the\ntwo source columns into that shape before sending.\n\n`source_file_id_column` holds the UUID returned by\n`FarseerClient.upload_file(...).id` — matches the `farseerFileId` key\nin the stored JSON. `source_filename_column` holds the display name.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `source_file_id_column` | string | yes | none | |\n| `source_filename_column` | string | yes | none | |\n| `target_dimension_table_column` | string | yes | none | |\n",
|
|
56
|
+
"FixedDimension": "## FixedDimension\n\nPin a dimension member for a variable column.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `dimension_table` | string | yes | none | |\n| `dimension_member` | string | yes | none | |\n",
|
|
57
|
+
"GoogleDriveExtractConfig": "## GoogleDriveExtractConfig\n\nExtraction settings for private Google Drive files (service account).\n\nAuthenticates as a Google Cloud service account; the client shares the\nfolder (or Shared Drive) with the service account's e-mail as a Viewer,\nso no domain-wide delegation and no per-user OAuth is involved.\n\n`service_account_json` is the service account's full JSON key,\ntemplated via `{{ pipeline_args.NAME }}` so a Remote Job's secret\n`expectedArguments` flow through at discovery time. Its shape is\nvalidated at extract time, not here — a schema-load error would echo\nthe offending input back into logs (`hide_input_in_errors` guards\nthe pydantic side of that).\n\nTwo addressing modes, mutually exclusive:\n\n- `file_id` — opaque Drive file ID.\n- `folder_id` + `file_path` — anchor folder ID (the folder the\n client shared) plus a slash-separated path below it, resolved one\n segment at a time. Folder IDs are stable across renames, so the\n anchor survives the client tidying up folder names. The final\n segment may contain `*` wildcards (e.g. `REPORT2502AC.*` for a\n source whose extension flips between `.xlsx` and `.xls` across\n periods); exactly one file must match.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `service_account_json` | string or null | no | `null` | |\n| `file_id` | string or null | no | `null` | |\n| `folder_id` | string or null | no | `null` | |\n| `file_path` | string or null | no | `null` | |\n",
|
|
58
|
+
"GoogleDrivePublicExtractConfig": "## GoogleDrivePublicExtractConfig\n\nExtraction settings for public Google Drive files.\n\nOnly works with files shared as \"Anyone with the link\" — no auth required.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `file_id` | string | yes | none | |\n",
|
|
59
|
+
"HubspotAssociationsExtractConfig": "## HubspotAssociationsExtractConfig\n\nOne row per (record of `object_type`, associated record) pair.\n\nThe link table between two HubSpot object types -- which company a deal\nbelongs to, which contacts a note was logged against. A record extract\ncarries no such information: HubSpot keeps associations beside the\nrecord, not on it, and reports them only when a crawl asks for the\n`to_object_types` by name. This grain does that ask over the same record\ncrawl `objects` uses, and explodes what comes back to one row per pair.\n\n`association_type` is HubSpot's own label for the link\n(`deal_to_company`, `note_to_contact`, ...). The same pair often arrives\ntwice, once as the typed link and once as its `_unlabeled` twin, which is\nHubSpot's representation of an unlabelled association rather than a\nduplicate; keep both or dedupe in a transform, as the model needs.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `object_type` | string | yes | none | |\n| `to_object_types` | array of string | yes | none | minItems=`1` |\n| `archived` | boolean | no | `false` | |\n| `page_size` | integer | no | `100` | maximum=`100`; exclusiveMinimum=`0` |\n",
|
|
60
|
+
"HubspotExtractConfig": "## HubspotExtractConfig\n\n`extract.type: hubspot` — multi-source family over the HubSpot CRM API.\n\nAuthentication is a `pat-<region>-...` bearer token — either an\n**account service key** (the current developer platform's credential\nfor single-account API access) or a **legacy private app token**. Both\nare account-level, carry the same object-specific scopes, and go over\nthe wire identically, so `access_token` is validated only for presence\nand not for shape: a token format check here would reject a\nHubSpot-issued credential the moment they add a fourth variant. The\ntoken is supplied as a YAML field, typically templated via\n`{{ pipeline_args.HUBSPOT_ACCESS_TOKEN }}` so a Remote Job's secret\n`expectedArguments` flow through at discovery time.\n\n`source:` picks the grain; the matching inner block carries its\nconfig. One token covers every source, so it lives out here.\n\nEvery source lands parquet, so a surrounding `parse:` block is never\nconsulted — same as `business_central` and `sql_database`. A declared\n`schema:` therefore checks the result rather than instructing the read.\n\nHubSpot serializes every record property as a JSON *string*, including\nnumbers, booleans and dates. The extractor reads the object's property\ncatalog and coerces each column to the type HubSpot declares for it,\nbecause leaving it alone would make `amount` a text column that sums\nby concatenation, and `\"false\"` a truthy value. Record ids stay\nstrings deliberately: they exceed 2^53 in some portals, so any numeric\ndtype would corrupt them.\n\nTimestamps land as timezone-naive UTC. HubSpot documents every time as\nUTC and date-only properties as midnight UTC; dropping the marker\nrather than converting keeps the values as HubSpot stated them and\nmatches the physical type the platform's `type: datetime` declares.\nLocalizing them to a negative-offset zone downstream would move a\nclose date — and its revenue — into the previous month.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `source` | [HubspotSource](#hubspotsource) | yes | none | |\n| `access_token` | string or null | no | `null` | |\n| `objects` | [HubspotObjectsExtractConfig](#hubspotobjectsextractconfig) or null | no | `null` | |\n| `pipelines` | [HubspotPipelinesExtractConfig](#hubspotpipelinesextractconfig) or null | no | `null` | |\n| `properties` | [HubspotPropertyCatalogConfig](#hubspotpropertycatalogconfig) or null | no | `null` | |\n| `property_options` | [HubspotPropertyCatalogConfig](#hubspotpropertycatalogconfig) or null | no | `null` | |\n| `associations` | [HubspotAssociationsExtractConfig](#hubspotassociationsextractconfig) or null | no | `null` | |\n| `owners` | [HubspotOwnersExtractConfig](#hubspotownersextractconfig) or null | no | `null` | |\n",
|
|
61
|
+
"HubspotObjectsExtractConfig": "## HubspotObjectsExtractConfig\n\nOne row per CRM record of `object_type`, one column per requested property.\n\n`object_type` is HubSpot's own plural object name as it appears in the\nAPI path (`deals`, `companies`, `contacts`, `line_items`, `tickets`),\nor a custom object's `p<portalId>_<name>` / `2-xxxxxxx` identifier.\n\n`properties` is required and has no wildcard form, which is the single\nmost consequential choice in this config. HubSpot returns only about\neight default properties when the parameter is omitted — a portal with\n400 deal properties answers a propertyless request with eight columns\nand no warning — so an implicit \"everything\" would make the dataset's\ncolumn set a function of whatever a HubSpot admin last added, silently\nfor undeclared columns and as a hard failure for anything downstream\ndeclaring a `schema:`. Declaring the list keeps the frame's shape owned\nby the pipeline. Extract `source: properties` first to discover what the\nportal actually has, then name the ones the model needs.\n\nProperty names are checked against the portal's own catalog before the\ncrawl starts: HubSpot ignores an unknown property rather than\nrejecting it, so a typo would otherwise land a frame quietly missing\nthat column.\n\n`archived` selects HubSpot's archived (soft-deleted, recoverable)\nrecords *instead of* the live ones — it is the API's own parameter, not\na union. Reading both means two datasets.\n\n`page_size` is HubSpot's `limit`. It defaults to the documented\nmaximum rather than HubSpot's own default of 10, which would make ten\ntimes as many requests for the same data.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `object_type` | string | yes | none | |\n| `properties` | array of string | yes | none | minItems=`1` |\n| `archived` | boolean | no | `false` | |\n| `page_size` | integer | no | `100` | maximum=`100`; exclusiveMinimum=`0` |\n",
|
|
62
|
+
"HubspotOwnersExtractConfig": "## HubspotOwnersExtractConfig\n\nOne row per HubSpot owner.\n\n`archived` selects deactivated owners instead of active ones. It\nmatters more here than on other sources: a record's\n`hubspot_owner_id` keeps pointing at the owner who left, so a\ndimension built from active owners alone leaves every deal that rep\never touched with an unresolvable owner — disproportionately the\noldest records. Extract both and concatenate.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `archived` | boolean | no | `false` | |\n| `page_size` | integer | no | `500` | maximum=`500`; exclusiveMinimum=`0` |\n",
|
|
63
|
+
"HubspotPipelinesExtractConfig": "## HubspotPipelinesExtractConfig\n\nOne row per (pipeline, stage) for `object_type`.\n\nDenormalized without fan-out: a HubSpot stage belongs to exactly one\npipeline, so the row count is the number of stages rather than a cross\nproduct — plus one row per pipeline that has no stages at all, which is\nkept with the stage columns null rather than dropped, so an empty\npipeline still reaches the dimension.\n\nNote that stage labels are only unique *within* a pipeline (\"Closed\nWon\" exists in every pipeline) and stage ids are only meaningful\ninside their own pipeline, so the join key back to a record's\n`dealstage` is the composite `(pipeline_id, stage_id)`.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `object_type` | string | yes | none | |\n| `archived` | boolean | no | `false` | |\n",
|
|
64
|
+
"HubspotPropertyCatalogConfig": "## HubspotPropertyCatalogConfig\n\nAddresses `object_type`'s property definitions.\n\nShared by `source: properties` (one row per definition) and\n`source: property_options` (one row per enumeration option) — the same\nHubSpot payload projected at two different grains.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `object_type` | string | yes | none | |\n| `archived` | boolean | no | `false` | |\n",
|
|
65
|
+
"HubspotSource": "## HubspotSource\n\nSub-discriminator on `extract.hubspot.source`.\n\nEach value is a distinct grain, not a variation of one shape:\n`objects` is one row per CRM record, `pipelines` one row per\n(pipeline, stage), `properties` one row per property definition,\n`property_options` one row per enumeration option, `owners` one row\nper owner, `associations` one row per (record, associated record) pair.\n\nValues: `\"objects\"`, `\"pipelines\"`, `\"properties\"`, `\"property_options\"`, `\"associations\"`, `\"owners\"`\n",
|
|
66
|
+
"IntercomAdminsExtractConfig": "## IntercomAdminsExtractConfig\n\nOne row per admin (teammate), so an author id resolves to a person.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n",
|
|
67
|
+
"IntercomContactsExtractConfig": "## IntercomContactsExtractConfig\n\nOne row per contact (users and leads alike).\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `page_size` | integer | no | `150` | maximum=`150`; exclusiveMinimum=`0` |\n",
|
|
68
|
+
"IntercomConversationPartsExtractConfig": "## IntercomConversationPartsExtractConfig\n\nOne row per message in a conversation, across every conversation.\n\nCosts one request per conversation on top of the list, so this is the\ngrain that sets a run's length.\n\n`plaintext` asks Intercom to render message bodies as plain text instead\nof HTML. On by default: the rendering is Intercom's own, and a text\ncorpus is what a reader of support conversations wants.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `page_size` | integer | no | `150` | maximum=`150`; exclusiveMinimum=`0` |\n| `plaintext` | boolean | no | `true` | |\n",
|
|
69
|
+
"IntercomConversationsExtractConfig": "## IntercomConversationsExtractConfig\n\nOne row per conversation, with its opening message inline.\n\nThe opening message (the `source` block) is on the conversation itself;\nthe replies are a different grain (`conversation_parts`) because they\ncost one request per conversation.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `page_size` | integer | no | `150` | maximum=`150`; exclusiveMinimum=`0` |\n",
|
|
70
|
+
"IntercomExtractConfig": "## IntercomExtractConfig\n\n`extract.type: intercom` — multi-source family over the Intercom REST API.\n\nAuthentication is an access token from an Intercom app installed in the\nworkspace (a \"private\" app for this one workspace is the usual shape);\nit is supplied as a YAML field, typically templated via\n`{{ pipeline_args.INTERCOM_ACCESS_TOKEN }}`. `region` picks the API host.\n\nEvery source lands parquet, so a surrounding `parse:` block is never\nconsulted, and a declared `schema:` checks the result rather than\ninstructing the read. Timestamps arrive as seconds since the epoch and\nland as timezone-naive UTC datetimes. Lists on a record (contact ids,\ntag names) land as `|`-joined text; structures with no fixed shape\n(custom attributes) land as JSON text.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `source` | [IntercomSource](#intercomsource) | yes | none | |\n| `access_token` | string or null | no | `null` | |\n| `region` | [IntercomRegion](#intercomregion) | no | `\"us\"` | |\n| `conversations` | [IntercomConversationsExtractConfig](#intercomconversationsextractconfig) or null | no | `null` | |\n| `conversation_parts` | [IntercomConversationPartsExtractConfig](#intercomconversationpartsextractconfig) or null | no | `null` | |\n| `contacts` | [IntercomContactsExtractConfig](#intercomcontactsextractconfig) or null | no | `null` | |\n| `admins` | [IntercomAdminsExtractConfig](#intercomadminsextractconfig) or null | no | `null` | |\n",
|
|
71
|
+
"IntercomRegion": "## IntercomRegion\n\nWhere an Intercom workspace's data lives, which picks the API host.\n\nIntercom hosts each workspace in one region and serves it from a\nregion-specific host; a token presented to the wrong host answers 401\nrather than redirecting, so the region is configuration rather than\nsomething the extractor can discover.\n\nValues: `\"us\"`, `\"eu\"`, `\"au\"`\n",
|
|
72
|
+
"IntercomSource": "## IntercomSource\n\nSub-discriminator on `extract.intercom.source`.\n\nValues: `\"conversations\"`, `\"conversation_parts\"`, `\"contacts\"`, `\"admins\"`\n",
|
|
73
|
+
"JsonParseOptions": "## JsonParseOptions\n\njson-specific parse options (passed to `pd.read_json`).\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `encoding` | string | no | `\"utf-8\"` | |\n",
|
|
74
|
+
"LoadCellDescriptionMapping": "## LoadCellDescriptionMapping\n\nMaps a DataFrame column to per-cell DESCRIPTION column metas.\n\nEach imported cell gets a description value pulled from the named source\ncolumn. Distinct from the job-level `import_job_description` scalar,\nwhich attaches a single note to the whole import job.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `source_column` | string | yes | none | |\n",
|
|
75
|
+
"LoadCellsConfig": "## LoadCellsConfig\n\nConfiguration for a single cell value import source.\n\n`source_dataset` names the dependency whose DataFrame contains the cell values.\n`import_job_title` is an optional scalar that populates the Import Job's\ntitle. When unset, the title defaults to `{step_name} — {source_dataset}`\nso entries within the same load step stay distinguishable in the Farseer UI.\n`import_job_description` is an optional scalar that populates the Import\nJob's top-level description field (distinct from per-row `cell_description`).\n`mapping` defines how DataFrame columns map to RAMA dimensions and variables.\n`options` controls import behavior (overwrite, missing members, undo, etc.).\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `source_dataset` | string | yes | none | |\n| `import_job_title` | string or null | no | `null` | string: maxLength=`255` |\n| `import_job_description` | string or null | no | `null` | |\n| `mapping` | [LoadMappingConfig](#loadmappingconfig) | yes | none | |\n| `options` | [CellsOptions](#cellsoptions) | yes | none | |\n\n### Example\n\n```yaml\n# Models/sales_load.yaml: a file's name must match its `name:`.\n# Writes the totals into Revenue, Actual version. The run argument is in the\n# labels, so undo_previous replaces only this month's earlier import.\n# source_dataset repeats a deps entry exactly. A model in a subfolder goes by\n# its qualified name (Models/silver/sales_monthly.yaml is silver.sales_monthly)\n# in both places, not the leaf name a transform's SQL uses.\nname: sales_load\ntype: load\ndeps: [sales_monthly]\nload:\n target: farseer\n farseer:\n cells:\n - source_dataset: sales_monthly\n mapping:\n dimension_tables:\n - source_column: product\n target_dimension_table: Product\n - source_column: region\n target_dimension_table: Region\n variables:\n - source_column: amount\n target_variable: Revenue\n fixed_dimension_members:\n - dimension_table: Versions\n dimension_member: Actual\n date:\n source_column: month\n format: YYYY_MM_DD\n options:\n overwrite_cells: true\n labels: [sales, \"{{ pipeline_args.SOURCE_FILE }}\"]\n undo_previous: true\n```\n",
|
|
76
|
+
"LoadConfig": "## LoadConfig\n\nConfiguration for a `type: load` dataset step.\n\n`target` selects the destination system. The target-specific config\nblock must match (e.g. `target: farseer` requires a `farseer:` section).\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `target` | [LoadTarget](#loadtarget) | yes | none | |\n| `farseer` | [FarseerLoadConfig](#farseerloadconfig) or null | no | `null` | |\n",
|
|
77
|
+
"LoadDateMapping": "## LoadDateMapping\n\nMaps a DataFrame column to RAMA time dimensions.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `source_column` | string | yes | none | |\n| `format` | `\"UNIX\"`, `\"ISO\"`, `\"EXCEL\"`, `\"DD_MM_YYYY\"`, `\"MM_DD_YYYY\"`, `\"YYYY_MM_DD\"`, `\"MM_YYYY\"`, `\"YYYY_MM\"` | no | `\"YYYY_MM_DD\"` | |\n",
|
|
78
|
+
"LoadDimensionMapping": "## LoadDimensionMapping\n\nMaps a DataFrame column to a RAMA dimension table.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `source_column` | string | yes | none | |\n| `target_dimension_table` | string | yes | none | |\n",
|
|
79
|
+
"LoadDimensionTableEntry": "## LoadDimensionTableEntry\n\nMaps a single dimension table to its source dataset.\n\n`source_dataset` names the dependency whose DataFrame contains members\nfor this table. `target_dimension_table` is the RAMA dimension table name.\n`mapping` defines the column structure. `options` carries per-table\nbehavior toggles (empty-frame handling).\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `source_dataset` | string | yes | none | |\n| `target_dimension_table` | string | yes | none | |\n| `options` | [DimensionTableEntryOptions](#dimensiontableentryoptions) | no | none | |\n| `mapping` | [LoadTableMapping](#loadtablemapping) | yes | none | |\n",
|
|
80
|
+
"LoadMappingConfig": "## LoadMappingConfig\n\nSchema-to-dimension mapping for cell import.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `dimension_tables` | array of [LoadDimensionMapping](#loaddimensionmapping) | yes | none | minItems=`1` |\n| `variables` | array of [LoadVariableMapping](#loadvariablemapping) | no | none | |\n| `timepoint_variables` | array of [TimepointVariableMapping](#timepointvariablemapping) | no | none | |\n| `date` | [LoadDateMapping](#loaddatemapping) or null | no | `null` | |\n| `cell_description` | [LoadCellDescriptionMapping](#loadcelldescriptionmapping) or null | no | `null` | |\n| `custom_fields` | array of [CustomField](#customfield) | no | none | |\n| `missing_member_descriptions` | array of [MissingMemberDescription](#missingmemberdescription) | no | none | |\n",
|
|
81
|
+
"LoadTableMapping": "## LoadTableMapping\n\nMaps DataFrame columns to a RAMA dimension table for member sync.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `source_primary_key_column` | string | yes | none | |\n| `source_description_column` | string or null | no | `null` | |\n| `source_order_column` | string or null | no | `null` | |\n| `source_active_column` | string or null | no | `null` | |\n| `connections` | array of [Connection](#connection) | no | none | |\n| `text_columns` | array of [TextColumn](#textcolumn) | no | none | |\n| `number_columns` | array of [NumberColumn](#numbercolumn) | no | none | |\n| `date_columns` | array of [DateColumn](#datecolumn) | no | none | |\n| `file_columns` | array of [FileColumn](#filecolumn) | no | none | |\n",
|
|
82
|
+
"LoadTarget": "## LoadTarget\n\nValues: `\"farseer\"`\n",
|
|
83
|
+
"LoadVariableMapping": "## LoadVariableMapping\n\nMaps a DataFrame column to a RAMA variable.\n\n`fixed_dimension_members` pins dimension members that are not present\nin the DataFrame (e.g. `Versions=Actual`).\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `fixed_dimension_members` | array of [FixedDimension](#fixeddimension) | no | none | |\n| `source_column` | string | yes | none | |\n| `target_variable` | string | yes | none | |\n",
|
|
84
|
+
"MissingMemberDescription": "## MissingMemberDescription\n\nMaps a DataFrame column to a TAG_DESCRIPTION column meta.\n\nPaired with an IDENTIFIER column on the same `target_dimension_table`:\nwhen the Import Job auto-creates missing dim members\n(`create_missing_members: true`), the new member's description is pulled\nfrom this column.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `source_column` | string | yes | none | |\n| `target_dimension_table` | string | yes | none | |\n",
|
|
85
|
+
"NotionDatabaseExtractConfig": "## NotionDatabaseExtractConfig\n\nOne row per page (row) of a Notion database, one column per property.\n\nThe column set comes from the database's own property definitions, read\nbefore the first row, so an empty database still lands every column and\ntwo runs land the same shape whatever rows happen to hold. Column names\nare the property names as Notion shows them; the record envelope lands\nas `notion_id`, `notion_created_time`, `notion_last_edited_time`,\n`notion_archived` and `notion_url`, and a property that would collide\nwith one of those fails the extract rather than overwriting it.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `database_id` | string | yes | none | |\n| `page_size` | integer | no | `100` | maximum=`100`; exclusiveMinimum=`0` |\n",
|
|
86
|
+
"NotionExtractConfig": "## NotionExtractConfig\n\n`extract.type: notion` — multi-source family over the Notion REST API.\n\nAuthentication is an internal integration token (`ntn_...`); the\ndatabase must be connected to that integration in Notion's share menu,\nor the API answers 404 as if it did not exist. The token is a YAML\nfield, typically templated via `{{ pipeline_args.NOTION_TOKEN }}`.\n\n`api_version` is the `Notion-Version` header. The default addresses a\ndatabase directly; Notion's later versions split a database from its\ndata sources, and a database with more than one data source needs the\nquery addressed to a data source, which this extractor does not do.\n\nEvery source lands parquet; a `parse:` block is never consulted.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `source` | [NotionSource](#notionsource) | yes | none | |\n| `access_token` | string or null | no | `null` | |\n| `api_version` | string | no | `\"2022-06-28\"` | |\n| `database` | [NotionDatabaseExtractConfig](#notiondatabaseextractconfig) or null | no | `null` | |\n| `page_content` | [NotionPageContentExtractConfig](#notionpagecontentextractconfig) or null | no | `null` | |\n",
|
|
87
|
+
"NotionPageContentExtractConfig": "## NotionPageContentExtractConfig\n\nOne row per page of a database, holding the page body as Markdown.\n\nCosts one request per page (more for a page with nested blocks), which\nis why this is a separate grain from `database`: the property table is\ncheap and the bodies are not. `max_depth` bounds how far nested blocks\n(toggles, columns, synced blocks) are followed.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `database_id` | string | yes | none | |\n| `page_size` | integer | no | `100` | maximum=`100`; exclusiveMinimum=`0` |\n| `max_depth` | integer | no | `3` | minimum=`1`; maximum=`10` |\n",
|
|
88
|
+
"NotionSource": "## NotionSource\n\nSub-discriminator on `extract.notion.source`.\n\nValues: `\"database\"`, `\"page_content\"`\n",
|
|
89
|
+
"NumberColumn": "## NumberColumn\n\nMaps a DataFrame column to a NUMBER attribute column on a RAMA dim table.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `source_column` | string | yes | none | |\n| `target_dimension_table_column` | string | yes | none | |\n",
|
|
90
|
+
"ParseConfig": "## ParseConfig\n\nParsing options for downloaded extract data.\n\nFormat-specific options live in per-format blocks (`csv_options` /\n`xlsx_options` / `json_options`); only the block matching `format`\nmay be set, and the matching block defaults when omitted. `parquet` has\nno read options. Same per-format block *shape* as the export side, but\nstricter: a block that does not match `format` is rejected, not ignored.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `format` | `\"csv\"`, `\"parquet\"`, `\"json\"`, `\"xlsx\"` | no | `\"csv\"` | |\n| `csv_options` | [CsvParseOptions](#csvparseoptions) or null | no | `null` | |\n| `xlsx_options` | [XlsxParseOptions](#xlsxparseoptions) or null | no | `null` | |\n| `json_options` | [JsonParseOptions](#jsonparseoptions) or null | no | `null` | |\n",
|
|
91
|
+
"QualityRuleEntry": "## QualityRuleEntry\n\nOne entry under a `quality_rules:` list.\n\nThree fields make up the shape locked in the design doc:\n\n- `type:` — the rule identifier. Either a Pandera built-in\n check name (e.g. `in_range`, `isin`, `str_matches`) or one\n of the custom checks we register (`custom__*`, including\n `custom__unique` / `custom__unique_composite` — see\n `quality.customs` for why uniqueness is a custom).\n- `params:` — kwargs forwarded verbatim to the rule. Field\n names mirror Pandera's parameter names.\n- `meta:` — rule metadata; carries `severity` for now.\n\nColumn rules go under a column's `quality_rules:`; dataset rules go\nunder the dataset's top-level `quality_rules:`. The custom rules:\n\n| type | scope | params |\n|---|---|---|\n| `custom__unique` | column | none; repeated nulls count as duplicates |\n| `custom__max_null_rate` | column | `max`: highest allowed share of nulls, 0 to 1 |\n| `custom__distinct_count` | column | `min` and/or `max` number of distinct values |\n| `custom__unique_composite` | dataset | `columns`: columns that must be unique together |\n| `custom__compare` | dataset | `left`, `right`: columns; `operator`: lt, lte, eq, gte, gt or ne |\n| `custom__sum_equals` | dataset | `total`: column; `parts`: columns; `tolerance`: optional, default 0 |\n| `custom__one_of_non_null` | dataset | `columns`: at least one must be non-null on every row |\n\nPandera's built-in checks (`in_range`, `isin`, `str_matches`,\n`equal_to`, `greater_than_or_equal_to` and the rest) take Pandera's own\nparameter names.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `type` | string | yes | none | |\n| `params` | object | no | none | |\n| `meta` | [QualityRuleMeta](#qualityrulemeta) | no | none | |\n",
|
|
92
|
+
"QualityRuleMeta": "## QualityRuleMeta\n\nPer-rule metadata.\n\nCarries `severity` for now (default `error` — failed rule\nblocks the step; `warn` logs and proceeds). Future metadata\nkeys land here without changing the rule shape.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `severity` | `\"error\"`, `\"warn\"` | no | `\"error\"` | |\n",
|
|
93
|
+
"ReviewGateConfig": "## ReviewGateConfig\n\nLeave the import uncommitted for manual review when the gate matches.\n\nWhen any row's `column` value is in `block_values`, the load uploads\nand syncs as normal but skips the commit, leaving the job `CREATED`\n(\"In progress\") and ending the run red. `column` must be a declared\n`custom_fields` column so its values render in the Import review screen.\nA reviewer then accepts or discards the import in the Import review\nscreen; nothing reaches the model until it is accepted.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `column` | string | yes | none | |\n| `block_values` | array of string | yes | none | minItems=`1` |\n",
|
|
94
|
+
"S3ExtractConfig": "## S3ExtractConfig\n\nExtraction settings for one object in an Amazon S3 bucket.\n\nAuthenticates with an IAM access key pair the YAML supplies, typically\ntemplated via `{{ pipeline_args.NAME }}` from a Remote Job's secret\n`expectedArguments`. There is deliberately no fallback to an ambient AWS\nidentity: the runner serves every tenant, so whatever credentials its\nenvironment holds are not any one pipeline's to use.\n\n`key` is the object key exactly as S3 stores it -- no leading-slash\nstripping, because `/a.csv` and `a.csv` are different objects. `region`\nis optional; without it botocore follows S3's redirect to the bucket's\nregion at the cost of a round trip.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `bucket` | string | yes | none | |\n| `key` | string | yes | none | |\n| `region` | string or null | no | `null` | |\n| `access_key_id` | string or null | no | `null` | |\n| `secret_access_key` | string or null | no | `null` | |\n| `session_token` | string or null | no | `null` | |\n",
|
|
95
|
+
"SapOdataCursor": "## SapOdataCursor\n\nThe change stamp an incremental SAP OData read advances on.\n\n`column` is a UTC change timestamp that SAP writes whenever a row\nchanges, in ABAP's decimal form `YYYYMMDDhhmmss.fffffff`\n(`LASTCHANGEDATETIME` on the billing-document and product views). Each\nrun reads the rows stamped from one second past the previous bound\nthrough the last whole second that ended `settle_lag` before `now`, the\nrunner's clock, because SAP sends no clock of its own.\nConsecutive windows tile, so a run over a quiet source reads nothing and\nthe run publishes no new version.\n\n`settle_lag_seconds` is how long a stamped row gets to become visible. A\nrow whose commit lags its stamp by more than this, less the amount SAP's\nclock runs behind the runner's, is never read by a window. The default\nis SAP's own safety interval for generic timestamp delta.\n\n`zero_stamp` is the rule for rows whose stamp is ABAP's initial value 0,\nSAP's null, which no window can contain. It has no default, because on\nthe billing header those rows are real documents -- cancellations are\ncreated with 0 and keep it:\n\n* `refuse` fails the run when any such row exists: the first read counts\n them, and every later run probes for them.\n* `creation_date` reads them by `creation_date_column`, a day-grain\n `Edm.DateTime`, once each day has closed everywhere: a day `d` is read\n from `(d+1)T12:00Z + settle_lag`, which covers every time zone the\n date can have been written in.\n\n`full_read_every_days` makes a run read the whole entity set again when\nthe last whole read is that many days old. Under upsert that repairs\nwhat a window cannot see: a change that did not move the stamp, a row\nthat committed later than the lag, a row that changes more often than\nthe lag.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `column` | string | yes | none | |\n| `zero_stamp` | `\"refuse\"`, `\"creation_date\"` | yes | none | |\n| `creation_date_column` | string or null | no | `null` | |\n| `settle_lag_seconds` | integer | no | `1800` | minimum=`60`; maximum=`86400` |\n| `full_read_every_days` | integer or null | no | `null` | integer: minimum=`1`; maximum=`366` |\n",
|
|
96
|
+
"SapOdataExtractConfig": "## SapOdataExtractConfig\n\nExtraction settings for SAP S/4HANA via an OData V2 service.\n\nReads a CDS-view-backed entity set exposed through SAP Gateway,\nauthenticating with HTTP basic against a read-only SAP service user.\nCredentials (`username`, `password`) are supplied as YAML fields,\ntypically templated via `{{ pipeline_args.NAME }}`.\n\nThe entity URL is composed as `{base_url}{service_path}/{entity_set}`,\nkept as separate fields so authors can't glue them into a malformed path.\n\nWithout `cursor`, every run re-reads the whole entity set, so pair it\nwith the dataset's `write_mode: overwrite` for a full refresh.\n\nWith `cursor` (see `SapOdataCursor`) the read is incremental: each run\nreads only the rows whose change stamp moved since the last published\nrun, and the dataset's watermark, kept by the backend, remembers how far\nthat was. Discovery then requires `write_mode: upsert` on the entity's\nkey, because a changed row arrives again and has to replace the row it\nwas, and `sap_client`, because the stream is one client's data. Nothing\nis registered in SAP -- the position lives only in the watermark.\n\nWhat the cursor cannot see: a change that does not move the stamp, a\nrow whose commit lagged its stamp by more than the settle lag, a column\nadded to the view after a row was read, and a row deleted at the source\n(on these views, an archived document). `full_read_every_days` repairs\nall but the last; deleted rows stay.\n\n**Changing the stream needs an operator step.** The stored progress is\nkeyed by the Gateway origin and path, the entity set, the client, the\ncursor columns, the zero-stamp rule and a hash of `select`. Changing any of them makes every\nlater run refuse, until `DELETE /labs/datasets/{id}/watermark` resets the\nprogress and the next run reads the whole entity set again.\n\nWith `odp` (see `SapOdataOdp`) the read is incremental through SAP's own\nchange tracking instead. It opens a subscription in SAP, so it needs a\ndedicated SAP user or service per dataset and environment. Discovery\napplies the same rules as for `cursor`, refuses both together, requires\n`odp.key` to equal `merge_keys`, and refuses `select`: how SAP applies\nthe initial load's projection to a delta read is not verified.\n\n`select` is OData `$select` passthrough. There is no `$filter`: SAP drops\na filter its ODP translation cannot handle and answers with every row,\nand nothing checks a full load's rows, so a filter belongs downstream.\n`max_page_size` is sent as `Prefer: odata.maxpagesize` and sizes each page\nSAP returns; the pages are then followed through their `__next` links.\nIt is not `$top`, which in SAP's V2 truncates the total result and is\nnever sent. Memory scales with it: a 146-column view peaked at about\n0.7 GB with the default of 10,000 and about 1.3 GB at 50,000. Unpatched\nSAP_BW 7.50-7.56 ignores a value above 50,000 (SAP note 3118751), so\n50,000 is the ceiling that pages on every release.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `base_url` | string | yes | none | |\n| `service_path` | string | yes | none | |\n| `entity_set` | string | yes | none | |\n| `max_page_size` | integer | no | `10000` | minimum=`1`; maximum=`50000` |\n| `sap_client` | string or null | no | `null` | |\n| `select` | string or null | no | `null` | |\n| `username` | string or null | no | `null` | |\n| `password` | string or null | no | `null` | |\n| `cursor` | [SapOdataCursor](#sapodatacursor) or null | no | `null` | |\n| `odp` | [SapOdataOdp](#sapodataodp) or null | no | `null` | |\n",
|
|
97
|
+
"SapOdataOdp": "## SapOdataOdp\n\nSAP's own change tracking (ODP delta) as the incremental read.\n\nThe first run sends `Prefer: odata.track-changes`, which opens a\nsubscription in SAP's operational delta queue (ODQ), and takes the new\ninitial-load token from `DeltaLinksOf<entity>`. Each later run reads the\nchanges since the committed token and commits the new one SAP hands out,\nalso from an empty read. SAP keeps the subscription, keyed by the SAP user\nand the OData service: one per pair, so every dataset and environment\nneeds its own user or service. A new initial load for the same pair\nsilently invalidates the tokens of whoever held it before.\n\n`key` is the entity's key. One delta can carry a key more than once, and\nthe last image in the response is the one kept. That is verified for a\nCDS view with change data capture, whose repeated images of one key are\nthe same. A recovery sends its requests in the order SAP delivered them,\nbut within one request SAP's order is not change order, so a source that\nsends two different images of one key in one request, as an extractor's\nafter-image delta process may, can keep the older one. It is wrong for\nsources that send differences. `key` has to equal the dataset's\n`merge_keys`.\n\n`deletes` is the rule for SAP's delete records. `ignore` is the only rule\nfor now: they are dropped and counted, so an archived document stays in\nthe dataset, as it does with the cursor.\n\n`reset_subscription_until` and `release_until` are lifecycle steps, each\nin effect until the instant it names and refused after it, so a copied\nor forgotten setting stops acting. `reset_subscription_until` ends this\nuser's subscription on the service before the initial load of a dataset\nwith no committed position; without it such a run refuses, since the\nsubscription may be another dataset's. `release_until` ends the\nsubscription of a dataset that holds a committed position and publishes\na released position, which every later run reads as nothing to do;\nnothing else ends it, because the backend holds no SAP credentials.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `key` | array of string | yes | none | minItems=`1` |\n| `deletes` | `\"ignore\"` | yes | none | |\n| `reset_subscription_until` | string or null | no | `null` | string: format=`\"date-time\"` |\n| `release_until` | string or null | no | `null` | string: format=`\"date-time\"` |\n",
|
|
98
|
+
"SharePointExportConfig": "## SharePointExportConfig\n\nSharePoint upload target via Microsoft Graph.\n\nSerializes the source DataFrame to `format` (csv / xlsx / parquet)\nand writes the bytes to `file_path` under `site_url`. Reuses the\nexact OAuth client-credentials flow and site/library resolution the\nSharePoint extractor already ships with — same `tenant_id` /\n`client_id` / `client_secret` triple, same `{{ pipeline_args.* }}`\ntemplating, same `library_name` conventions.\n\nRequired Azure AD application permissions: either `Sites.ReadWrite.All`\n(tenant-wide) or `Sites.Selected` + per-site `write` grant.\n\n`conflict_behavior=REPLACE` (default) is safe for SharePoint\ndocument libraries because versioning is on by default — prior\nuploads remain recoverable through the SharePoint UI. Targets\nwithout versioning (future: raw SFTP) should interpret `REPLACE`\nas a genuinely destructive overwrite and document that caveat on\ntheir own config class.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `source_dataset` | string | yes | none | |\n| `site_url` | string | yes | none | |\n| `file_path` | string | yes | none | |\n| `library_name` | string or null | no | `null` | |\n| `tenant_id` | string or null | no | `null` | |\n| `client_id` | string or null | no | `null` | |\n| `client_secret` | string or null | no | `null` | |\n| `format` | [ExportFormat](#exportformat) | no | `\"csv\"` | |\n| `conflict_behavior` | [ConflictBehavior](#conflictbehavior) | no | `\"replace\"` | |\n| `csv_options` | [CSVWriteOptions](#csvwriteoptions) | no | none | |\n| `xlsx_options` | [XLSXWriteOptions](#xlsxwriteoptions) | no | none | |\n",
|
|
99
|
+
"SharePointExtractConfig": "## SharePointExtractConfig\n\nExtraction settings for SharePoint files via Microsoft Graph API.\n\nRequires an Azure AD app registration with Sites.Read.All (or\nSites.Selected) permission.\n\nCredentials (`tenant_id`, `client_id`, `client_secret`) are\nsupplied as YAML fields — typically templated via\n`{{ pipeline_args.NAME }}` so a Remote Job's secret\n`expectedArguments` flow through at discovery time.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `site_url` | string | yes | none | |\n| `file_path` | string | yes | none | |\n| `library_name` | string or null | no | `null` | |\n| `tenant_id` | string or null | no | `null` | |\n| `client_id` | string or null | no | `null` | |\n| `client_secret` | string or null | no | `null` | |\n",
|
|
100
|
+
"SqlDatabaseExtractConfig": "## SqlDatabaseExtractConfig\n\nExtraction settings for SQL databases via SQLAlchemy.\n\nUses `pd.read_sql` / `pd.read_sql_table` under the hood. The\n*connection_string* must be a valid SQLAlchemy URL (e.g.\n`postgresql+psycopg2://user:pass@host/db`).\n\nSpecify exactly one of *query* or *table*.\n\n`cursor_column` makes the extract incremental. It names a column of the\nquery's result (or of the table) whose values only ever grow for new or\nchanged rows: an `updated_at` timestamp, an autoincrement id, a log\nsequence number. Each run then reads only the rows past the position the\nprevious run committed, and the dataset's watermark, kept by the backend,\nremembers that position across runs. The window is fixed before it is\nread: the run first asks the source for the column's current maximum, then\nreads `(committed, maximum]`. Each retry measures a new maximum; the bound\nis fixed within one attempt and does not provide a shared database snapshot.\nThe tenant chooses `write_mode` independently: append and upsert accumulate\nrows, while overwrite retains only the latest published window. The store\nmust support the requested mode and the extraction lifecycle (see `WriteMode`).\n\nWhat the cursor cannot see: a row whose cursor value does not change when\nthe row changes, and a row deleted at the source. Both stay as they were\nlast read. An initial read (no committed bound) refuses null cursors, since\nno window can include them. Later runs only inspect rows past the committed\nbound, so historical nulls do not block progress; null rows remain excluded\nuntil assigned a cursor beyond that bound. Rows sharing the maximum value\nwith a row still being written at the moment of the read are read once and\nnever again, so the column should be one the source assigns at commit, not\nat the start of a transaction.\n\n**Renaming the cursor column, or moving the source, needs an operator step.**\nThe stored progress is keyed by the derivation's version, the driver name,\nthe host and port, the database, the relation *and* the cursor column (for\na `query`, the relation is a hash of its exact text), plus a hash of any\ndriver options left in the URL. Changing any of them in this YAML makes\nevery later run refuse:\na position measured against one stream never applied to another. Answering\nthat refusal is `PUT /labs/datasets/{id}/watermark`, which states the new\nkey and the position to carry over. Nothing about the data already stored\nchanges. The position carried over names the column it was measured on, and\na run whose cursor is a different column refuses it rather than bounding on\na value that was never compared against that column.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `connection_string` | string | yes | none | |\n| `table` | string or null | no | `null` | |\n| `batch_size` | integer | no | `100000` | exclusiveMinimum=`0` |\n| `query` | string or null | no | `null` | |\n| `cursor_column` | string or null | no | `null` | |\n",
|
|
101
|
+
"StepType": "## StepType\n\nValues: `\"extract\"`, `\"transform\"`, `\"load\"`, `\"export\"`\n",
|
|
102
|
+
"TenantCredentialsConfig": "## TenantCredentialsConfig\n\nYAML-validated Farseer credentials, embedded as `farseer_credentials:` wherever needed.\n\n`api_key` is `pydantic.SecretStr` — call `.get_secret_value()`\nat the boundary where the live string is needed. `hide_input_in_errors`\nkeeps the key out of `pydantic.ValidationError` messages, which\nby default echo the raw input dict.\n\nShape: `tenant_id` + `api_key` are both required whenever the block\nis present. `base_url` is optional and defaults to the runner's\n`FARSEER_URL`. To use the runner's own tenant, omit the\n`farseer_credentials:` block entirely — pydantic enforces the\nrequired-pair invariant via the field types.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `tenant_id` | string | yes | none | |\n| `api_key` | string | yes | none | format=`\"password\"`; secret / write-only |\n| `base_url` | string or null | no | `null` | |\n",
|
|
103
|
+
"TextColumn": "## TextColumn\n\nMaps a DataFrame column to a TEXT attribute column on a RAMA dim table.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `source_column` | string | yes | none | |\n| `target_dimension_table_column` | string | yes | none | |\n",
|
|
104
|
+
"TimePoint": "## TimePoint\n\nA RAMA time point, identified by (year, month).\n\nClient-side ID convention matches the backend: `timePointId = year * 100 + month`.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `year` | integer | yes | none | minimum=`1900`; maximum=`9999` |\n| `month` | integer | yes | none | minimum=`1`; maximum=`12` |\n",
|
|
105
|
+
"TimepointVariableMapping": "## TimepointVariableMapping\n\nMaps a wide-format column to a RAMA variable pinned to a specific timepoint.\n\nUnlike `LoadVariableMapping` (which maps long-format VALUES columns whose\ntime is resolved per-row from `date:` or Years/Months IDENTIFIER columns),\nthis mapping pins the column to one (year, month) via `timepoint` — the\ncolumn becomes a TIMEPOINT columnMeta on the import job.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `fixed_dimension_members` | array of [FixedDimension](#fixeddimension) | no | none | |\n| `source_column` | string | yes | none | |\n| `target_variable` | string | yes | none | |\n| `timepoint` | [TimePoint](#timepoint) | yes | none | |\n",
|
|
106
|
+
"TldvExtractConfig": "## TldvExtractConfig\n\n`extract.type: tldv` — multi-source family over the tl;dv REST API.\n\nAuthentication is a personal API key from tl;dv's settings, sent as\n`x-api-key`; it is a YAML field, typically templated via\n`{{ pipeline_args.TLDV_API_KEY }}`. A key sees the meetings its owner\ncan see, and a transcript is exported only for meetings whose organizer\nis on a paid plan -- tl;dv answers 403 for the others, which the\nextractor logs and skips per meeting rather than failing the run.\n\n`meetings` is one row per meeting; `transcripts` one row per spoken\nsegment; `notes` one row per meeting with tl;dv's generated notes as\nMarkdown. The filter block is the same on all three. Every source\nlands parquet; a `parse:` block is never consulted.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `source` | [TldvSource](#tldvsource) | yes | none | |\n| `api_key` | string or null | no | `null` | |\n| `meetings` | [TldvMeetingsFilter](#tldvmeetingsfilter) or null | no | `null` | |\n| `transcripts` | [TldvMeetingsFilter](#tldvmeetingsfilter) or null | no | `null` | |\n| `notes` | [TldvMeetingsFilter](#tldvmeetingsfilter) or null | no | `null` | |\n",
|
|
107
|
+
"TldvMeetingsFilter": "## TldvMeetingsFilter\n\nWhich meetings a tl;dv source reads: a date window.\n\nShared by every source, because transcripts and notes are addressed per\nmeeting and so start from the same meeting list. `from_date` and\n`to_date` are ISO 8601 dates.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `from_date` | string or null | no | `null` | |\n| `to_date` | string or null | no | `null` | |\n| `page_size` | integer | no | `50` | maximum=`50`; exclusiveMinimum=`0` |\n",
|
|
108
|
+
"TldvSource": "## TldvSource\n\nSub-discriminator on `extract.tldv.source`.\n\nValues: `\"meetings\"`, `\"transcripts\"`, `\"notes\"`\n",
|
|
109
|
+
"TransformConfig": "## TransformConfig\n\nConfiguration for a `type: transform` dataset step.\n\nChoose the surface in this order and always set `engine`, because its\ndefault is `python`: SQL (`duckdb`) for anything set-based, `ibis` when the\nlogic needs Python to compose, and `python` only for work with no lazy form.\n`duckdb` and `ibis` stream; `python` holds every input and its output in\nmemory.\n\nFor `engine: duckdb`:\n\n`query` (inline SQL) supplies the query. Upstream `deps` are exposed to\nthe SQL as views named by their leaf name. Output is always parquet.\n`sql_file` (a `.sql` file in `Code/`) exists for engine-run pipelines but\nis refused for authored pipelines, which are validated before any source\nis read; use `query`.\n\nFor `engine: ibis`:\n\n`script` names a `Code/` file holding an `@ibis_transform` function. The\nrunner calls it with one lazy ibis `Table` per dep, named by the dep's leaf\nname, and it must return a `Table`; returning a DataFrame is refused. Rows\ncome back in no fixed order unless the expression ends in `.order_by()`.\n\n from farseer_simple_pipelines import ibis_transform\n\n @ibis_transform\n def sales_clean(sales_lines, *, args):\n t = sales_lines\n for column in args[\"code_columns\"]:\n t = t.mutate(**{column: t[column].strip().upper()})\n return t.order_by(args[\"code_columns\"])\n\nFor `engine: python`:\n\n`script` is the Python filename containing the `@transform` function.\nThe runner calls it with one pandas DataFrame per dep, as a keyword\nargument named by the dep's leaf name, and the function returns one\nDataFrame.\n\nFor both script surfaces:\n\n`function` optionally overrides which decorated function in the script\nbacks this dataset. When unset, the runner binds the function whose name\nmatches the dataset's leaf name. Setting this lets one shared function\nback many datasets (e.g. a single `tb_any` used by `tb_c4c`, `tb_cdg`,\n`tb_cih`). `args` is an arbitrary dict passed to the function's\nkeyword-only `args` parameter, if it declares one. The script lives under\n`Code/`, mirroring the dataset's folder under `Models/`.\n\n`format` must be parquet, which is also its default, so there is normally\nno reason to set it. A transform's output is typed and read back by\nscanning it, and neither survives csv or json; the rule is enforced at\ndiscovery by `validate_transform_declarations`, not here, so that a bad\nvalue fails the run rather than skipping the dataset.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `engine` | [TransformEngine](#transformengine) | no | `\"python\"` | |\n| `script` | string or null | no | `null` | |\n| `function` | string or null | no | `null` | |\n| `query` | string or null | no | `null` | |\n| `sql_file` | string or null | no | `null` | |\n| `format` | [DataFormat](#dataformat) | no | `\"parquet\"` | |\n| `args` | object | no | none | |\n| `max_file_size` | string or integer or null | no | `null` | |\n\n### Example\n\n```yaml\n# Models/sales_monthly.yaml: a file's name must match its `name:`.\n# Totals the month by product and region in SQL. Each dep is a view named after\n# its leaf name; cast SUMs and dates, which DuckDB returns as DECIMAL and DATE.\nname: sales_monthly\ntype: transform\ndeps: [sales_raw]\ntransform:\n engine: duckdb\n query: |\n SELECT\n product,\n region,\n strftime(CAST(sale_date AS DATE), '%Y-%m-01') AS month,\n CAST(SUM(amount) AS DOUBLE) AS amount\n FROM sales_raw\n GROUP BY ALL\n```\n",
|
|
110
|
+
"TransformEngine": "## TransformEngine\n\nHow a transform is authored, and therefore whether it materialises.\n\nNot the compute engine, despite the name: there is one of those, DuckDB, and\nevery surface here runs on it. What this selects is the authoring surface --\nand because exactly one surface holds a whole dataset in memory, it is also\nthe step's resource envelope, declared where a scheduler can read it before\nthe step has ever run. The name is kept because the field is a tenant's\nYAML.\n\n`duckdb` runs author SQL over the dependency relations. Streams.\n\n`ibis` runs an `@ibis_transform` function over lazy tables, returning one.\nStreams.\n\n`python` runs a `@transform` function over DataFrames, returning one. **The\nonly surface that materialises**, so a step declaring it is bounded by the\ncontainer rather than by a memory limit.\n\nValues: `\"python\"`, `\"duckdb\"`, `\"ibis\"`\n",
|
|
111
|
+
"WriteMode": "## WriteMode\n\nChoose how an extract or transform writes its output to a dataset.\n\n`overwrite` replaces the rows, `append` adds rows, and `upsert` replaces\nmatching keys while retaining the others. The tenant chooses the mode on\neach run, independently of whether the source uses a cursor. Overwriting\nan incremental window and appending a complete result are both intentional\nchoices we support. The store must implement the requested mode; currently\nonly the Iceberg store supports append and upsert.\n\nQuality rules and `schema:` see the accumulated dataset rather than this\nrun's rows, because validation loads back what was persisted. A rule has to\nhold across runs. Schema-only checks avoid a cached copy, but quality rules\nmaterialize the full dataset; incremental reads do not make validation cost\nproportional to the new window.\n\nA run whose window read no rows publishes no version and adds no file, so\nwhat a consumer reads tracks changes rather than runs. The exception is an\nextractor that returns its position as a `MovedPosition` (SAP ODP, which\nserves an older delta token only as a recovery of what it already\ndelivered): that window is published, empty, to carry it. Declared validation\nstill checks the published dataset: rules may have changed since the last\npublication. A first run over an empty source does publish, so a consumer\nfinds an empty dataset rather than none, provided the step declares its\ncolumn types under `schema:`. Without them the Iceberg store refuses that\nrun: every column of an empty result arrives untyped, and a new table needs\ntypes.\n\nThe candidate that a quiet run opened is cancelled and its logical version\nnumber stays consumed. Physical cleanup and metadata retention are deferred;\nthe abandonment sweep only marks eligible active attempts cancelled.\n\nValues: `\"overwrite\"`, `\"append\"`, `\"upsert\"`\n",
|
|
112
|
+
"XLSXWriteOptions": "## XLSXWriteOptions\n\nOptions for DataFrame → XLSX serialization on export.\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `sheet_name` | string | no | `\"Sheet1\"` | |\n| `include_header` | boolean | no | `true` | |\n",
|
|
113
|
+
"XlsxParseOptions": "## XlsxParseOptions\n\nxlsx-specific parse options (passed to `pd.read_excel`).\n\nUnknown fields are rejected.\n\n| YAML field | Type | Required | Default | Constraints / description |\n| --- | --- | --- | --- | --- |\n| `sheet_name` | string or integer | no | `0` | |\n| `columns` | string or null | no | `null` | |\n| `has_header` | boolean | no | `true` | |\n| `start_row` | integer or null | no | `null` | |\n"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var guide_exports = {};
|
|
20
|
+
__export(guide_exports, {
|
|
21
|
+
PIPELINE_GUIDE: () => PIPELINE_GUIDE,
|
|
22
|
+
PIPELINE_PRACTICES: () => PIPELINE_PRACTICES
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(guide_exports);
|
|
25
|
+
var import_pipeline = require("../skills/pipeline");
|
|
26
|
+
const PIPELINE_GUIDE = import_pipeline.pipelineSkill.body;
|
|
27
|
+
const PIPELINE_PRACTICES = import_pipeline.pipelineSkill.practices;
|
|
28
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
29
|
+
0 && (module.exports = {
|
|
30
|
+
PIPELINE_GUIDE,
|
|
31
|
+
PIPELINE_PRACTICES
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=guide.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/pipeline/guide.ts"],
|
|
4
|
+
"sourcesContent": ["import { pipelineSkill } from '../skills/pipeline';\n\n// CLI and MCP guide callers read the same method and practices as native skill clients.\nexport const PIPELINE_GUIDE = pipelineSkill.body;\nexport const PIPELINE_PRACTICES = pipelineSkill.practices;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAA8B;AAGvB,MAAM,iBAAiB,8BAAc;AACrC,MAAM,qBAAqB,8BAAc;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var init_exports = {};
|
|
30
|
+
__export(init_exports, {
|
|
31
|
+
initPipelineProfile: () => initPipelineProfile
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(init_exports);
|
|
34
|
+
var fs = __toESM(require("fs"));
|
|
35
|
+
var path = __toESM(require("path"));
|
|
36
|
+
var import_crypto = require("crypto");
|
|
37
|
+
var import_connect = require("./connect");
|
|
38
|
+
var import_reference = require("./reference");
|
|
39
|
+
var import_runtime = require("./runtime");
|
|
40
|
+
var import_service = require("./service");
|
|
41
|
+
const { load: loadYaml } = require("js-yaml");
|
|
42
|
+
const CONVENTIONAL_ENTRYPOINT = "main.py";
|
|
43
|
+
const DATASET_NAME = /^[A-Za-z0-9_-]+$/;
|
|
44
|
+
async function initPipelineProfile(options, client, paths) {
|
|
45
|
+
const warnings = [];
|
|
46
|
+
const job = await readJob(client, options.jobId);
|
|
47
|
+
const workspace = options.workspace ?? await locateWorkspace(client, job);
|
|
48
|
+
const folder = await resolveFolder(client, job, workspace);
|
|
49
|
+
const file = targetFile(paths.profileDir, workspace, options.force ?? false);
|
|
50
|
+
const identity = {
|
|
51
|
+
organisation: options.organisation,
|
|
52
|
+
tenant: options.tenant,
|
|
53
|
+
jobId: job.id,
|
|
54
|
+
sourceFolderId: job.sourceFolderId,
|
|
55
|
+
workspace
|
|
56
|
+
};
|
|
57
|
+
const kept = writtenByPeople(file, identity, warnings);
|
|
58
|
+
const draft = import_service.profileSchema.parse({
|
|
59
|
+
...identity,
|
|
60
|
+
author: kept?.author,
|
|
61
|
+
configFiles: kept?.configFiles,
|
|
62
|
+
entrypoint: entrypointFor(job, folder, warnings),
|
|
63
|
+
engine: import_reference.PIPELINE_ENGINE_PROFILE,
|
|
64
|
+
schedule: job.schedule ?? null
|
|
65
|
+
});
|
|
66
|
+
const runtime = (0, import_runtime.compareRuntime)(job.runnerImage);
|
|
67
|
+
if (runtime.status !== "match") warnings.push(runtime.nextAction);
|
|
68
|
+
if (job.schedule)
|
|
69
|
+
warnings.push(`Job runs on schedule "${job.schedule}" (recorded in the profile). ${import_service.SCHEDULE_NOTE}`);
|
|
70
|
+
const service = new import_service.PipelineService(draft, client, paths.filesDir, paths.stateRoot);
|
|
71
|
+
const { definitions, skipped } = await scanDefinitions(service, paths.filesDir, warnings);
|
|
72
|
+
const resolved = await resolveDatasets(client, definitions);
|
|
73
|
+
const profile = import_service.profileSchema.parse({
|
|
74
|
+
...draft,
|
|
75
|
+
datasetIds: [...new Set(resolved.datasets.map((d) => d.id))],
|
|
76
|
+
setup: kept?.setup ?? import_service.BLANK_SETUP
|
|
77
|
+
});
|
|
78
|
+
writeProfile(file, profile);
|
|
79
|
+
return {
|
|
80
|
+
file,
|
|
81
|
+
profile,
|
|
82
|
+
...resolved,
|
|
83
|
+
skippedDefinitions: skipped,
|
|
84
|
+
warnings,
|
|
85
|
+
nextSteps: [
|
|
86
|
+
"Fill the setup record: owner, checkedAt (ISO datetime), evidence, retentionDays, otherWritersExcluded=true and runtimeVerified=true. These are owner statements; check reports the record as pending until all are filled.",
|
|
87
|
+
...resolved.pendingDatasets.length ? [
|
|
88
|
+
`Pending datasets (${resolved.pendingDatasets.map((d) => d.name).join(", ")}) are created on the first run; rerun init jobId=${job.id} force=true after it to record their IDs.`
|
|
89
|
+
] : [],
|
|
90
|
+
"Run check to see what is verified and what is still pending."
|
|
91
|
+
]
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
async function readJob(client, jobId) {
|
|
95
|
+
const job = await client.getApp(String(jobId));
|
|
96
|
+
if (!job) throw new Error(`Job ${jobId} was not found on this tenant`);
|
|
97
|
+
const runnerImage = job.runnerImage ?? "";
|
|
98
|
+
(0, import_runtime.assertPipelineRuntime)(runnerImage);
|
|
99
|
+
if (!job.sourceFolderId) throw new Error(`Job ${jobId} has no source folder; set one in the web app first`);
|
|
100
|
+
return { ...job, sourceFolderId: job.sourceFolderId, runnerImage };
|
|
101
|
+
}
|
|
102
|
+
async function locateWorkspace(client, job) {
|
|
103
|
+
const advice = "give the workspace folder (workspace=<dir>, the tenant-relative source folder path)";
|
|
104
|
+
if (!job.mainScriptFileId) throw new Error(`Job ${job.id} has no main script; ${advice}`);
|
|
105
|
+
const script = (await client.listFiles(["Files"])).find((f) => f.reference === job.mainScriptFileId);
|
|
106
|
+
if (!script) throw new Error(`Main script of job ${job.id} was not found under Files; ${advice}`);
|
|
107
|
+
const workspace = path.posix.dirname(script.path);
|
|
108
|
+
if (workspace === ".") throw new Error(`Main script of job ${job.id} sits at the Files root; ${advice}`);
|
|
109
|
+
return workspace;
|
|
110
|
+
}
|
|
111
|
+
async function resolveFolder(client, job, workspace) {
|
|
112
|
+
const folder = await client.resolveSourceFolder(workspace);
|
|
113
|
+
if (!folder) throw new Error(`Workspace folder "${workspace}" does not exist under Files`);
|
|
114
|
+
if (folder.id !== job.sourceFolderId)
|
|
115
|
+
throw new Error(
|
|
116
|
+
`Workspace folder "${workspace}" (id ${folder.id}) is not the source folder of job ${job.id} (id ${job.sourceFolderId})`
|
|
117
|
+
);
|
|
118
|
+
return folder;
|
|
119
|
+
}
|
|
120
|
+
function entrypointFor(job, folder, warnings) {
|
|
121
|
+
const script = folder.scripts.find((s) => s.id === job.mainScriptFileId);
|
|
122
|
+
if (script) return script.name;
|
|
123
|
+
warnings.push(
|
|
124
|
+
`Job ${job.id} names no main script inside its source folder; wrote the conventional entrypoint ${CONVENTIONAL_ENTRYPOINT}. Until the job's main script is set to it, check reports prepared-job as failed and run refuses.`
|
|
125
|
+
);
|
|
126
|
+
return CONVENTIONAL_ENTRYPOINT;
|
|
127
|
+
}
|
|
128
|
+
function writtenByPeople(file, identity, warnings) {
|
|
129
|
+
if (!fs.existsSync(file)) return void 0;
|
|
130
|
+
let existing;
|
|
131
|
+
try {
|
|
132
|
+
existing = (0, import_service.readPipelineProfileFile)(file);
|
|
133
|
+
} catch (error) {
|
|
134
|
+
warnings.push(
|
|
135
|
+
`The existing profile could not be read, so its setup record, config files and author were not kept: ${(0, import_service.redact)(error instanceof Error ? error.message : String(error))}`
|
|
136
|
+
);
|
|
137
|
+
return void 0;
|
|
138
|
+
}
|
|
139
|
+
const same = Object.keys(identity).every((key) => existing[key] === identity[key]);
|
|
140
|
+
return same ? { author: existing.author, configFiles: existing.configFiles, setup: existing.setup } : void 0;
|
|
141
|
+
}
|
|
142
|
+
function targetFile(profileDir, workspace, force) {
|
|
143
|
+
const file = (0, import_connect.profileFile)(profileDir, path.posix.basename(workspace));
|
|
144
|
+
if (fs.existsSync(file) && !force)
|
|
145
|
+
throw new Error(`Profile ${file} already exists for workspace ${workspace}; set force=true to overwrite it`);
|
|
146
|
+
return file;
|
|
147
|
+
}
|
|
148
|
+
async function scanDefinitions(service, filesDir, warnings) {
|
|
149
|
+
if (!service.localSources().length) {
|
|
150
|
+
try {
|
|
151
|
+
await service.syncSources("pull");
|
|
152
|
+
} catch (error) {
|
|
153
|
+
warnings.push(
|
|
154
|
+
`No local source and the pull failed, so no datasets were derived: ${(0, import_service.redact)(String(error))}. Fix the job, pull, then rerun init jobId=${service.profile.jobId} force=true.`
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
const prefix = `${service.profile.workspace}/Models/`;
|
|
159
|
+
const definitions = [];
|
|
160
|
+
const skipped = [];
|
|
161
|
+
for (const file of service.localSources().filter((f) => f.startsWith(prefix) && /\.ya?ml$/.test(f)).sort()) {
|
|
162
|
+
const parsed = readDefinition(path.join(filesDir, file), file.slice(prefix.length));
|
|
163
|
+
if ("reason" in parsed) skipped.push({ file, reason: parsed.reason });
|
|
164
|
+
else definitions.push({ file, qualifiedName: parsed.qualifiedName });
|
|
165
|
+
}
|
|
166
|
+
return { definitions, skipped };
|
|
167
|
+
}
|
|
168
|
+
function readDefinition(absolute, relativeToModels) {
|
|
169
|
+
let data;
|
|
170
|
+
try {
|
|
171
|
+
data = loadYaml(fs.readFileSync(absolute, "utf8"));
|
|
172
|
+
} catch {
|
|
173
|
+
return { reason: "invalid YAML syntax" };
|
|
174
|
+
}
|
|
175
|
+
const name = data?.name;
|
|
176
|
+
if (typeof name !== "string") return { reason: "no string name field" };
|
|
177
|
+
if (!DATASET_NAME.test(name)) return { reason: `name "${name}" is templated or not a plain dataset name` };
|
|
178
|
+
const namespace = path.posix.dirname(relativeToModels).split("/").filter((p) => p !== ".");
|
|
179
|
+
return { qualifiedName: [...namespace, name].join(".") };
|
|
180
|
+
}
|
|
181
|
+
async function resolveDatasets(client, definitions) {
|
|
182
|
+
if (definitions.length === 0) return { datasets: [], pendingDatasets: [] };
|
|
183
|
+
const remote = await client.pipelineRequest("GET", "/labs/datasets");
|
|
184
|
+
const byName = new Map(remote.map((d) => [d.name, d.id]));
|
|
185
|
+
const datasets = [];
|
|
186
|
+
const pendingDatasets = [];
|
|
187
|
+
for (const { file, qualifiedName: name } of definitions) {
|
|
188
|
+
const id = byName.get(name);
|
|
189
|
+
if (id) datasets.push({ name, id, file });
|
|
190
|
+
else pendingDatasets.push({ name, file });
|
|
191
|
+
}
|
|
192
|
+
return { datasets, pendingDatasets };
|
|
193
|
+
}
|
|
194
|
+
function writeProfile(file, profile) {
|
|
195
|
+
fs.mkdirSync(path.dirname(file), { recursive: true });
|
|
196
|
+
const tmp = `${file}.${(0, import_crypto.randomUUID)()}`;
|
|
197
|
+
fs.writeFileSync(tmp, JSON.stringify(profile, null, 2) + "\n", { mode: 384 });
|
|
198
|
+
fs.renameSync(tmp, file);
|
|
199
|
+
}
|
|
200
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
201
|
+
0 && (module.exports = {
|
|
202
|
+
initPipelineProfile
|
|
203
|
+
});
|
|
204
|
+
//# sourceMappingURL=init.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/pipeline/init.ts"],
|
|
4
|
+
"sourcesContent": ["import * as fs from 'fs';\nimport * as path from 'path';\nimport { randomUUID } from 'crypto';\nimport type { RemoteApp, SourceFolderResolution } from '../services/apps';\nimport { profileFile, type PipelinePaths } from './connect';\nimport { PIPELINE_ENGINE_PROFILE } from './reference';\nimport { assertPipelineRuntime, compareRuntime } from './runtime';\nimport {\n BLANK_SETUP,\n PipelineClient,\n PipelineProfile,\n PipelineService,\n profileSchema,\n readPipelineProfileFile,\n redact,\n SCHEDULE_NOTE,\n} from './service';\n\nconst { load: loadYaml }: { load: (source: string) => unknown } = require('js-yaml');\n\n/** What the skill's starter layout uses and what check expects when the job names no script. */\nconst CONVENTIONAL_ENTRYPOINT = 'main.py';\n// Mirrors the engine's charset for a rendered dataset name; anything else is templated or invalid.\nconst DATASET_NAME = /^[A-Za-z0-9_-]+$/;\n\nexport interface InitOptions {\n organisation: string;\n tenant: string;\n jobId: number;\n workspace?: string;\n force?: boolean;\n}\ninterface Definition {\n file: string;\n qualifiedName: string;\n}\ninterface SkippedDefinition {\n file: string;\n reason: string;\n}\nexport interface InitResult {\n file: string;\n profile: PipelineProfile;\n datasets: { name: string; id: string; file: string }[];\n /** Declared under Models/ but not created yet; the engine creates a dataset on its first write. */\n pendingDatasets: { name: string; file: string }[];\n skippedDefinitions: SkippedDefinition[];\n warnings: string[];\n nextSteps: string[];\n}\ntype Job = RemoteApp & { sourceFolderId: number; runnerImage: string };\n\n/** Derive a profile from the prepared job and write it. Reads only; never changes remote state. */\nexport async function initPipelineProfile(\n options: InitOptions,\n client: PipelineClient,\n paths: PipelinePaths,\n): Promise<InitResult> {\n const warnings: string[] = [];\n const job = await readJob(client, options.jobId);\n const workspace = options.workspace ?? (await locateWorkspace(client, job));\n const folder = await resolveFolder(client, job, workspace);\n const file = targetFile(paths.profileDir, workspace, options.force ?? false);\n const identity = {\n organisation: options.organisation,\n tenant: options.tenant,\n jobId: job.id,\n sourceFolderId: job.sourceFolderId,\n workspace,\n };\n const kept = writtenByPeople(file, identity, warnings);\n const draft = profileSchema.parse({\n ...identity,\n author: kept?.author,\n configFiles: kept?.configFiles,\n entrypoint: entrypointFor(job, folder, warnings),\n engine: PIPELINE_ENGINE_PROFILE,\n schedule: job.schedule ?? null,\n });\n const runtime = compareRuntime(job.runnerImage);\n if (runtime.status !== 'match') warnings.push(runtime.nextAction);\n if (job.schedule)\n warnings.push(`Job runs on schedule \"${job.schedule}\" (recorded in the profile). ${SCHEDULE_NOTE}`);\n const service = new PipelineService(draft, client, paths.filesDir, paths.stateRoot);\n const { definitions, skipped } = await scanDefinitions(service, paths.filesDir, warnings);\n const resolved = await resolveDatasets(client, definitions);\n const profile = profileSchema.parse({\n ...draft,\n datasetIds: [...new Set(resolved.datasets.map((d) => d.id))],\n setup: kept?.setup ?? BLANK_SETUP,\n });\n writeProfile(file, profile);\n return {\n file,\n profile,\n ...resolved,\n skippedDefinitions: skipped,\n warnings,\n nextSteps: [\n 'Fill the setup record: owner, checkedAt (ISO datetime), evidence, retentionDays, otherWritersExcluded=true and runtimeVerified=true. These are owner statements; check reports the record as pending until all are filled.',\n ...(resolved.pendingDatasets.length\n ? [\n `Pending datasets (${resolved.pendingDatasets.map((d) => d.name).join(', ')}) are created on the first run; rerun init jobId=${job.id} force=true after it to record their IDs.`,\n ]\n : []),\n 'Run check to see what is verified and what is still pending.',\n ],\n };\n}\n\nasync function readJob(client: PipelineClient, jobId: number): Promise<Job> {\n const job = await client.getApp(String(jobId));\n if (!job) throw new Error(`Job ${jobId} was not found on this tenant`);\n const runnerImage = job.runnerImage ?? '';\n assertPipelineRuntime(runnerImage);\n if (!job.sourceFolderId) throw new Error(`Job ${jobId} has no source folder; set one in the web app first`);\n return { ...job, sourceFolderId: job.sourceFolderId, runnerImage };\n}\n\n/** The job stores a folder ID, not a path; the path comes from where its main script lives. */\nasync function locateWorkspace(client: PipelineClient, job: Job): Promise<string> {\n const advice = 'give the workspace folder (workspace=<dir>, the tenant-relative source folder path)';\n if (!job.mainScriptFileId) throw new Error(`Job ${job.id} has no main script; ${advice}`);\n const script = (await client.listFiles(['Files'])).find((f) => f.reference === job.mainScriptFileId);\n if (!script) throw new Error(`Main script of job ${job.id} was not found under Files; ${advice}`);\n const workspace = path.posix.dirname(script.path);\n if (workspace === '.') throw new Error(`Main script of job ${job.id} sits at the Files root; ${advice}`);\n return workspace;\n}\n\nasync function resolveFolder(client: PipelineClient, job: Job, workspace: string): Promise<SourceFolderResolution> {\n const folder = await client.resolveSourceFolder(workspace);\n if (!folder) throw new Error(`Workspace folder \"${workspace}\" does not exist under Files`);\n if (folder.id !== job.sourceFolderId)\n throw new Error(\n `Workspace folder \"${workspace}\" (id ${folder.id}) is not the source folder of job ${job.id} (id ${job.sourceFolderId})`,\n );\n return folder;\n}\n\nfunction entrypointFor(job: Job, folder: SourceFolderResolution, warnings: string[]): string {\n const script = folder.scripts.find((s) => s.id === job.mainScriptFileId);\n if (script) return script.name;\n warnings.push(\n `Job ${job.id} names no main script inside its source folder; wrote the conventional entrypoint ${CONVENTIONAL_ENTRYPOINT}. Until the job's main script is set to it, check reports prepared-job as failed and run refuses.`,\n );\n return CONVENTIONAL_ENTRYPOINT;\n}\n\n/**\n * What people wrote into the existing profile, kept when it belongs to the same job and folder: a\n * rerun with force refreshes only what init reads from the job. A profile for anything else, or one\n * that cannot be read, is replaced by a fresh one.\n */\nfunction writtenByPeople(\n file: string,\n identity: Pick<PipelineProfile, 'organisation' | 'tenant' | 'jobId' | 'sourceFolderId' | 'workspace'>,\n warnings: string[],\n): Pick<PipelineProfile, 'author' | 'configFiles' | 'setup'> | undefined {\n if (!fs.existsSync(file)) return undefined;\n let existing: PipelineProfile;\n try {\n existing = readPipelineProfileFile(file);\n } catch (error) {\n warnings.push(\n `The existing profile could not be read, so its setup record, config files and author were not kept: ${redact(error instanceof Error ? error.message : String(error))}`,\n );\n return undefined;\n }\n const same = (Object.keys(identity) as (keyof typeof identity)[]).every((key) => existing[key] === identity[key]);\n return same ? { author: existing.author, configFiles: existing.configFiles, setup: existing.setup } : undefined;\n}\n\n/** Named after the pipeline folder, so one tenant can hold a profile per pipeline. */\nfunction targetFile(profileDir: string, workspace: string, force: boolean): string {\n const file = profileFile(profileDir, path.posix.basename(workspace));\n if (fs.existsSync(file) && !force)\n throw new Error(`Profile ${file} already exists for workspace ${workspace}; set force=true to overwrite it`);\n return file;\n}\n\n/** Dataset YAML in the local Models/ tree, pulled first when the workspace has no local source. */\nasync function scanDefinitions(\n service: PipelineService,\n filesDir: string,\n warnings: string[],\n): Promise<{ definitions: Definition[]; skipped: SkippedDefinition[] }> {\n if (!service.localSources().length) {\n try {\n await service.syncSources('pull');\n } catch (error) {\n warnings.push(\n `No local source and the pull failed, so no datasets were derived: ${redact(String(error))}. Fix the job, pull, then rerun init jobId=${service.profile.jobId} force=true.`,\n );\n }\n }\n const prefix = `${service.profile.workspace}/Models/`;\n const definitions: Definition[] = [];\n const skipped: SkippedDefinition[] = [];\n for (const file of service\n .localSources()\n .filter((f) => f.startsWith(prefix) && /\\.ya?ml$/.test(f))\n .sort()) {\n const parsed = readDefinition(path.join(filesDir, file), file.slice(prefix.length));\n if ('reason' in parsed) skipped.push({ file, reason: parsed.reason });\n else definitions.push({ file, qualifiedName: parsed.qualifiedName });\n }\n return { definitions, skipped };\n}\n\n/** Same rule as the engine: folders under Models/ form the namespace, the YAML name is the last segment. */\nfunction readDefinition(absolute: string, relativeToModels: string): { qualifiedName: string } | { reason: string } {\n let data: unknown;\n try {\n data = loadYaml(fs.readFileSync(absolute, 'utf8'));\n } catch {\n return { reason: 'invalid YAML syntax' };\n }\n const name = (data as { name?: unknown } | null)?.name;\n if (typeof name !== 'string') return { reason: 'no string name field' };\n if (!DATASET_NAME.test(name)) return { reason: `name \"${name}\" is templated or not a plain dataset name` };\n const namespace = path.posix\n .dirname(relativeToModels)\n .split('/')\n .filter((p) => p !== '.');\n return { qualifiedName: [...namespace, name].join('.') };\n}\n\nasync function resolveDatasets(client: PipelineClient, definitions: Definition[]) {\n // A newly scaffolded pipeline (or a plain script job) has no dataset names\n // to resolve. It must be initializable before dataset storage is configured.\n if (definitions.length === 0) return { datasets: [], pendingDatasets: [] };\n const remote = await client.pipelineRequest<{ id: string; name: string }[]>('GET', '/labs/datasets');\n const byName = new Map(remote.map((d) => [d.name, d.id]));\n const datasets: InitResult['datasets'] = [];\n const pendingDatasets: InitResult['pendingDatasets'] = [];\n for (const { file, qualifiedName: name } of definitions) {\n const id = byName.get(name);\n if (id) datasets.push({ name, id, file });\n else pendingDatasets.push({ name, file });\n }\n return { datasets, pendingDatasets };\n}\n\nfunction writeProfile(file: string, profile: PipelineProfile) {\n fs.mkdirSync(path.dirname(file), { recursive: true });\n const tmp = `${file}.${randomUUID()}`;\n fs.writeFileSync(tmp, JSON.stringify(profile, null, 2) + '\\n', { mode: 0o600 });\n fs.renameSync(tmp, file);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAAoB;AACpB,WAAsB;AACtB,oBAA2B;AAE3B,qBAAgD;AAChD,uBAAwC;AACxC,qBAAsD;AACtD,qBASO;AAEP,MAAM,EAAE,MAAM,SAAS,IAA2C,QAAQ,SAAS;AAGnF,MAAM,0BAA0B;AAEhC,MAAM,eAAe;AA8BrB,eAAsB,oBAClB,SACA,QACA,OACmB;AACnB,QAAM,WAAqB,CAAC;AAC5B,QAAM,MAAM,MAAM,QAAQ,QAAQ,QAAQ,KAAK;AAC/C,QAAM,YAAY,QAAQ,aAAc,MAAM,gBAAgB,QAAQ,GAAG;AACzE,QAAM,SAAS,MAAM,cAAc,QAAQ,KAAK,SAAS;AACzD,QAAM,OAAO,WAAW,MAAM,YAAY,WAAW,QAAQ,SAAS,KAAK;AAC3E,QAAM,WAAW;AAAA,IACb,cAAc,QAAQ;AAAA,IACtB,QAAQ,QAAQ;AAAA,IAChB,OAAO,IAAI;AAAA,IACX,gBAAgB,IAAI;AAAA,IACpB;AAAA,EACJ;AACA,QAAM,OAAO,gBAAgB,MAAM,UAAU,QAAQ;AACrD,QAAM,QAAQ,6BAAc,MAAM;AAAA,IAC9B,GAAG;AAAA,IACH,QAAQ,MAAM;AAAA,IACd,aAAa,MAAM;AAAA,IACnB,YAAY,cAAc,KAAK,QAAQ,QAAQ;AAAA,IAC/C,QAAQ;AAAA,IACR,UAAU,IAAI,YAAY;AAAA,EAC9B,CAAC;AACD,QAAM,cAAU,+BAAe,IAAI,WAAW;AAC9C,MAAI,QAAQ,WAAW,QAAS,UAAS,KAAK,QAAQ,UAAU;AAChE,MAAI,IAAI;AACJ,aAAS,KAAK,yBAAyB,IAAI,QAAQ,gCAAgC,4BAAa,EAAE;AACtG,QAAM,UAAU,IAAI,+BAAgB,OAAO,QAAQ,MAAM,UAAU,MAAM,SAAS;AAClF,QAAM,EAAE,aAAa,QAAQ,IAAI,MAAM,gBAAgB,SAAS,MAAM,UAAU,QAAQ;AACxF,QAAM,WAAW,MAAM,gBAAgB,QAAQ,WAAW;AAC1D,QAAM,UAAU,6BAAc,MAAM;AAAA,IAChC,GAAG;AAAA,IACH,YAAY,CAAC,GAAG,IAAI,IAAI,SAAS,SAAS,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AAAA,IAC3D,OAAO,MAAM,SAAS;AAAA,EAC1B,CAAC;AACD,eAAa,MAAM,OAAO;AAC1B,SAAO;AAAA,IACH;AAAA,IACA;AAAA,IACA,GAAG;AAAA,IACH,oBAAoB;AAAA,IACpB;AAAA,IACA,WAAW;AAAA,MACP;AAAA,MACA,GAAI,SAAS,gBAAgB,SACvB;AAAA,QACI,qBAAqB,SAAS,gBAAgB,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC,oDAAoD,IAAI,EAAE;AAAA,MACzI,IACA,CAAC;AAAA,MACP;AAAA,IACJ;AAAA,EACJ;AACJ;AAEA,eAAe,QAAQ,QAAwB,OAA6B;AACxE,QAAM,MAAM,MAAM,OAAO,OAAO,OAAO,KAAK,CAAC;AAC7C,MAAI,CAAC,IAAK,OAAM,IAAI,MAAM,OAAO,KAAK,+BAA+B;AACrE,QAAM,cAAc,IAAI,eAAe;AACvC,4CAAsB,WAAW;AACjC,MAAI,CAAC,IAAI,eAAgB,OAAM,IAAI,MAAM,OAAO,KAAK,qDAAqD;AAC1G,SAAO,EAAE,GAAG,KAAK,gBAAgB,IAAI,gBAAgB,YAAY;AACrE;AAGA,eAAe,gBAAgB,QAAwB,KAA2B;AAC9E,QAAM,SAAS;AACf,MAAI,CAAC,IAAI,iBAAkB,OAAM,IAAI,MAAM,OAAO,IAAI,EAAE,wBAAwB,MAAM,EAAE;AACxF,QAAM,UAAU,MAAM,OAAO,UAAU,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,cAAc,IAAI,gBAAgB;AACnG,MAAI,CAAC,OAAQ,OAAM,IAAI,MAAM,sBAAsB,IAAI,EAAE,+BAA+B,MAAM,EAAE;AAChG,QAAM,YAAY,KAAK,MAAM,QAAQ,OAAO,IAAI;AAChD,MAAI,cAAc,IAAK,OAAM,IAAI,MAAM,sBAAsB,IAAI,EAAE,4BAA4B,MAAM,EAAE;AACvG,SAAO;AACX;AAEA,eAAe,cAAc,QAAwB,KAAU,WAAoD;AAC/G,QAAM,SAAS,MAAM,OAAO,oBAAoB,SAAS;AACzD,MAAI,CAAC,OAAQ,OAAM,IAAI,MAAM,qBAAqB,SAAS,8BAA8B;AACzF,MAAI,OAAO,OAAO,IAAI;AAClB,UAAM,IAAI;AAAA,MACN,qBAAqB,SAAS,SAAS,OAAO,EAAE,qCAAqC,IAAI,EAAE,QAAQ,IAAI,cAAc;AAAA,IACzH;AACJ,SAAO;AACX;AAEA,SAAS,cAAc,KAAU,QAAgC,UAA4B;AACzF,QAAM,SAAS,OAAO,QAAQ,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,gBAAgB;AACvE,MAAI,OAAQ,QAAO,OAAO;AAC1B,WAAS;AAAA,IACL,OAAO,IAAI,EAAE,qFAAqF,uBAAuB;AAAA,EAC7H;AACA,SAAO;AACX;AAOA,SAAS,gBACL,MACA,UACA,UACqE;AACrE,MAAI,CAAC,GAAG,WAAW,IAAI,EAAG,QAAO;AACjC,MAAI;AACJ,MAAI;AACA,mBAAW,wCAAwB,IAAI;AAAA,EAC3C,SAAS,OAAO;AACZ,aAAS;AAAA,MACL,2GAAuG,uBAAO,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,CAAC,CAAC;AAAA,IACzK;AACA,WAAO;AAAA,EACX;AACA,QAAM,OAAQ,OAAO,KAAK,QAAQ,EAAgC,MAAM,CAAC,QAAQ,SAAS,GAAG,MAAM,SAAS,GAAG,CAAC;AAChH,SAAO,OAAO,EAAE,QAAQ,SAAS,QAAQ,aAAa,SAAS,aAAa,OAAO,SAAS,MAAM,IAAI;AAC1G;AAGA,SAAS,WAAW,YAAoB,WAAmB,OAAwB;AAC/E,QAAM,WAAO,4BAAY,YAAY,KAAK,MAAM,SAAS,SAAS,CAAC;AACnE,MAAI,GAAG,WAAW,IAAI,KAAK,CAAC;AACxB,UAAM,IAAI,MAAM,WAAW,IAAI,iCAAiC,SAAS,kCAAkC;AAC/G,SAAO;AACX;AAGA,eAAe,gBACX,SACA,UACA,UACoE;AACpE,MAAI,CAAC,QAAQ,aAAa,EAAE,QAAQ;AAChC,QAAI;AACA,YAAM,QAAQ,YAAY,MAAM;AAAA,IACpC,SAAS,OAAO;AACZ,eAAS;AAAA,QACL,yEAAqE,uBAAO,OAAO,KAAK,CAAC,CAAC,8CAA8C,QAAQ,QAAQ,KAAK;AAAA,MACjK;AAAA,IACJ;AAAA,EACJ;AACA,QAAM,SAAS,GAAG,QAAQ,QAAQ,SAAS;AAC3C,QAAM,cAA4B,CAAC;AACnC,QAAM,UAA+B,CAAC;AACtC,aAAW,QAAQ,QACd,aAAa,EACb,OAAO,CAAC,MAAM,EAAE,WAAW,MAAM,KAAK,WAAW,KAAK,CAAC,CAAC,EACxD,KAAK,GAAG;AACT,UAAM,SAAS,eAAe,KAAK,KAAK,UAAU,IAAI,GAAG,KAAK,MAAM,OAAO,MAAM,CAAC;AAClF,QAAI,YAAY,OAAQ,SAAQ,KAAK,EAAE,MAAM,QAAQ,OAAO,OAAO,CAAC;AAAA,QAC/D,aAAY,KAAK,EAAE,MAAM,eAAe,OAAO,cAAc,CAAC;AAAA,EACvE;AACA,SAAO,EAAE,aAAa,QAAQ;AAClC;AAGA,SAAS,eAAe,UAAkB,kBAA0E;AAChH,MAAI;AACJ,MAAI;AACA,WAAO,SAAS,GAAG,aAAa,UAAU,MAAM,CAAC;AAAA,EACrD,QAAQ;AACJ,WAAO,EAAE,QAAQ,sBAAsB;AAAA,EAC3C;AACA,QAAM,OAAQ,MAAoC;AAClD,MAAI,OAAO,SAAS,SAAU,QAAO,EAAE,QAAQ,uBAAuB;AACtE,MAAI,CAAC,aAAa,KAAK,IAAI,EAAG,QAAO,EAAE,QAAQ,SAAS,IAAI,6CAA6C;AACzG,QAAM,YAAY,KAAK,MAClB,QAAQ,gBAAgB,EACxB,MAAM,GAAG,EACT,OAAO,CAAC,MAAM,MAAM,GAAG;AAC5B,SAAO,EAAE,eAAe,CAAC,GAAG,WAAW,IAAI,EAAE,KAAK,GAAG,EAAE;AAC3D;AAEA,eAAe,gBAAgB,QAAwB,aAA2B;AAG9E,MAAI,YAAY,WAAW,EAAG,QAAO,EAAE,UAAU,CAAC,GAAG,iBAAiB,CAAC,EAAE;AACzE,QAAM,SAAS,MAAM,OAAO,gBAAgD,OAAO,gBAAgB;AACnG,QAAM,SAAS,IAAI,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;AACxD,QAAM,WAAmC,CAAC;AAC1C,QAAM,kBAAiD,CAAC;AACxD,aAAW,EAAE,MAAM,eAAe,KAAK,KAAK,aAAa;AACrD,UAAM,KAAK,OAAO,IAAI,IAAI;AAC1B,QAAI,GAAI,UAAS,KAAK,EAAE,MAAM,IAAI,KAAK,CAAC;AAAA,QACnC,iBAAgB,KAAK,EAAE,MAAM,KAAK,CAAC;AAAA,EAC5C;AACA,SAAO,EAAE,UAAU,gBAAgB;AACvC;AAEA,SAAS,aAAa,MAAc,SAA0B;AAC1D,KAAG,UAAU,KAAK,QAAQ,IAAI,GAAG,EAAE,WAAW,KAAK,CAAC;AACpD,QAAM,MAAM,GAAG,IAAI,QAAI,0BAAW,CAAC;AACnC,KAAG,cAAc,KAAK,KAAK,UAAU,SAAS,MAAM,CAAC,IAAI,MAAM,EAAE,MAAM,IAAM,CAAC;AAC9E,KAAG,WAAW,KAAK,IAAI;AAC3B;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|