Loading...
Loading...
Compare original and translation side by side
dev → prodcarto workflows copycarto-query-datawarehouse| Command | What it serves |
|---|---|
| Index of all bundle/DAG schema sections |
| Top-level bundle shape (id, title, connectionId, config, privacy, tags). |
| Full DAG config (schemaVersion, connectionProvider enum, nodes, edges, variables, viewport, useCache, executionSettings, schedule) |
| Generic node shape, including |
| Source/ |
| Full customsql node spec |
| Copy-paste customsql node template (with |
| Edge shape |
| Edge handle naming reference — sourceHandle/targetHandle by node type, by operator, by component. Critical for valid edges. |
| Variable (parameter) shape — |
| Declarative schedule metadata fields |
| All valid enums (node types, providers, privacies, schedule frequencies) |
| Component catalog for the connected warehouse |
| Per-component |
| Input-type |
| Full command reference, including schedule-expression dialects per engine |
references/providers/references/scheduling.mdaddupdatereferences/mcp-and-api-publish.mdnative.mcptooloutput{{@var}}@varNumber → FLOAT64LIMITreferences/cross-profile-copy.mdworkflows copy--connection-mapping--connection--skip-source-validationreferences/schedule-readd.mdworkflows copymust match the connection.connectionProvider(enum inconfig.connectionProvider) must match the connection's actual provider — mismatches generate the wrong SQL dialect and error at runtime. Look it up withschema enums(carto connections list --search <name> --jsonrequires a UUID).connections get
dev → prodcarto workflows copycarto-query-datawarehouse| 命令 | 用途 |
|---|---|
| 所有bundle/DAG schema章节的索引 |
| 顶层bundle结构(id、title、connectionId、config、privacy、tags)。 |
| 完整DAG配置(schemaVersion、connectionProvider枚举、nodes、edges、variables、viewport、useCache、executionSettings、schedule) |
| 通用节点结构,包括 |
| Source/ |
| 完整customsql节点规范 |
| 可直接复制的customsql节点模板(含 |
| 边的结构 |
| 边句柄命名参考——按节点类型、操作符、组件划分的sourceHandle/targetHandle。对创建有效边至关重要。 |
| 变量(参数)结构—— |
| 声明式调度元数据字段 |
| 所有有效枚举值(节点类型、提供商、隐私设置、调度频率) |
| 已连接数据仓库的组件目录 |
| 单个组件的 |
| 输入类型的 |
| 完整命令参考,包括各引擎对应的调度表达式语法 |
references/providers/references/scheduling.mdaddupdatereferences/mcp-and-api-publish.mdnative.mcptooloutput{{@var}}@varNumber → FLOAT64LIMITreferences/cross-profile-copy.mdworkflows copy--connection-mapping--connection--skip-source-validationreferences/schedule-readd.mdworkflows copy必须与连接匹配。connectionProvider(config.connectionProvider中的枚举值)必须与连接的实际提供商匹配——不匹配会生成错误的SQL方言并在运行时出错。使用schema enums查询(carto connections list --search <name> --json需要UUID)。connections get
carto connections listcarto connections describe <connection> "<fqn>"carto connections list | head -n 20providerbigquerysnowflakedatabricks$a$bvalidateverify-remotecarto workflows components list --connection <connection> --jsoncarto connections listcarto connections describe <connection> "<fqn>"carto connections list | head -n 20providerbigquerysnowflakedatabricks$a$bvalidateverify-remotecarto workflows components list --connection <connection> --jsoncarto workflows components get <name1>,<name2>,<name3> --connection <connection> --jsoninputsoutputsnotesnotescarto workflows components get <component1>,<component2> --connection <connection> --input-formats --jsonformatexamplespitfallsnative.buffernative.customsqlgeomh3quadbincarto workflows components get <name1>,<name2>,<name3> --connection <connection> --jsoninputsoutputsnotesnotescarto workflows components get <component1>,<component2> --connection <connection> --input-formats --jsonformatexamplespitfallsnative.buffernative.customsqlgeomh3quadbin0.051000m0.051000mcarto workflows schema [section]bundlenodenode.sourcenode.customsqledgehandlescarto workflows schema customsqlprivacy"privacy": { "privacy": "private" }"privacy": "private"validatetype: "source"ReadTablecarto workflows components get ReadTable --connection <conn> --jsoninputs[*].titleinputs[*].descriptionReadTablecomponents list__internalgetgetschema node.sourcedata.labeldata.titletitlelabeldata.iddata.inputs[0].valuexy% 16 == 0xdata.titledata.labeltitle"Rank""Join to score""To H3"label"Join""Create Column""H3 from GeoPoint"carto workflows components get <name> --jsoncomponents[0].titledata.label"Candidates""Score grid C"validatecarto workflows validate workflow.json --jsonvalidatevalidatecomponents getvalidatevalidateverifycarto workflows verify-remote workflow.json --connection <connection-name> --jsonverifyvalidatevalidateverifycarto workflows schema [section]bundlenodenode.sourcenode.customsqledgehandlescarto workflows schema customsqlprivacy"privacy": { "privacy": "private" }"privacy": "private"validatetype: "source"ReadTablecarto workflows components get ReadTable --connection <conn> --jsoninputs[*].titleinputs[*].descriptionReadTablecomponents list__internalgetgetschema node.sourcedata.labeldata.titletitlelabeldata.iddata.inputs[0].valuexy% 16 == 0xdata.titledata.labeltitle"Rank""Join to score""To H3"label"Join""Create Column""H3 from GeoPoint"carto workflows components get <name> --jsoncomponents[0].titledata.label"Candidates""Score grid C"validatecarto workflows validate workflow.json --jsonvalidatevalidatecomponents getvalidatevalidateverifycarto workflows verify-remote workflow.json --connection <connection-name> --jsonverifyvalidatevalidateverifycarto workflows create --file workflow.json --verifyconnectionId--connectioncarto workflows create --file workflow.json --verifyconnectionId--connectionnative.customsqlcarto workflows components listST_UNION_AGGLOGICAL_ORML.PREDICT| If you'd write SQL like… | Use natives |
|---|---|
| |
| |
| |
| |
| |
| |
| |
| |
| H3 binning / boundary / center / polyfill | |
| |
| z-score / standardization | |
| weighted composite score | |
| Getis-Ord Gi*, GWR, isolines | |
| Save final node to a table | |
WHEREJOINGROUP BYST_BUFFERH3_FROMGEOGPOINTnative.selectnative.selectexpressionreferences/providers/*.mdnative.customsqlcarto workflows components listST_UNION_AGGLOGICAL_ORML.PREDICT| 若你要编写此类SQL… | 使用原生组件 |
|---|---|
| |
| |
| |
| |
| |
| |
跨两张表计算 | |
| |
| H3分箱/边界/中心/填充 | |
| |
| z-score / 标准化 | |
| 加权综合评分 | |
| Getis-Ord Gi*、GWR、等值线 | |
| 将最终节点保存到表 | |
WHEREJOINGROUP BYST_BUFFERH3_FROMGEOGPOINTnative.selectnative.selectexpressionreferences/providers/*.md| Command | Purpose |
|---|---|
| List all available components |
| Component schemas with |
| Input type |
notesformatexamplespitfallsversiondata.versionoptionsjointype"inner""Inner"components getschemaconfig.schemaVersioncarto workflows schema config --jsonproperties.schemaVersion.default"1.0.0"| 命令 | 用途 |
|---|---|
| 列出所有可用组件 |
| 组件Schema,包含 |
| 组件所用输入类型的 |
notesformatexamplespitfallsversiondata.versionoptionsjointype"inner""Inner"components getschemaconfig.schemaVersioncarto workflows schema config --jsonproperties.schemaVersion.default"1.0.0"references/providers/bigquery.mdreferences/providers/snowflake.mdreferences/providers/databricks.mdTableColumnColumnsForJoinSelectColumnAggregationverifyvalidatereferences/providers/bigquery.mdreferences/providers/snowflake.mdreferences/providers/databricks.mdTableColumnColumnsForJoinSelectColumnAggregationverifyvalidateundefinedundefined
Always-on guidance:
- **Workflows run on the connection's warehouse.** A workflow with a BigQuery connection cannot use Snowflake-specific SQL.
- **Schedule expression syntax depends on the engine** — natural-language for BQ/CARTO DW (`"every day 08:00"`), cron for Snowflake/Postgres (`"0 8 * * *"`), Quartz cron for Databricks (`"0 0 8 * * ?"`). See [`references/scheduling.md`](references/scheduling.md). Picking the wrong dialect fails at schedule-add time.
- **Copying a workflow across profiles** (dev → prod, customer-segregated workspaces) is covered in [`references/cross-profile-copy.md`](references/cross-profile-copy.md). Schedules don't transfer — see [`references/schedule-readd.md`](references/schedule-readd.md).
- **Deleting a workflow doesn't delete its outputs.** Tables/views the workflow created in the warehouse persist; clean them up with `carto sql job` if needed.
- **`workflows update` replaces the whole DAG.** There's no per-node patch. Always `get` first, edit, then `update`.
- **Workflow execution status** lives in the activity log (`WorkflowRun`, `WorkflowExecutionComplete` event types). For health monitoring of scheduled workflows, query that log via [`carto-query-datawarehouse`](../carto-query-datawarehouse) — see `references/activity-queries.md` in that skill.
通用指导:
- **工作流在连接的数据仓库上运行**。使用BigQuery连接的工作流无法使用Snowflake专属SQL。
- **调度表达式语法取决于引擎**——BQ/CARTO DW使用自然语言(`"every day 08:00"`),Snowflake/Postgres使用cron(`"0 8 * * *"`),Databricks使用Quartz cron(`"0 0 8 * * ?"`)。详见[`references/scheduling.md`](references/scheduling.md)。选择错误语法会在添加调度时失败。
- **跨配置文件复制工作流**(dev → prod、客户隔离工作区)详见[`references/cross-profile-copy.md`](references/cross-profile-copy.md)。调度不会随复制转移——详见[`references/schedule-readd.md`](references/schedule-readd.md)。
- **删除工作流不会删除其输出**。工作流在数据仓库中创建的表/视图会保留;如需清理请使用`carto sql job`。
- **`workflows update`会替换整个DAG**。不支持单个节点补丁。始终先`get`、编辑、再`update`。
- **工作流执行状态**位于活动日志中(`WorkflowRun`、`WorkflowExecutionComplete`事件类型)。如需监控调度工作流的健康状态,请通过[`carto-query-datawarehouse`](../carto-query-datawarehouse)查询该日志——详见该技能中的`references/activity-queries.md`。