Serialize Workspace Node to Disk YAML
serialize_workspace_node_to_disk_yamlConvert a cloud workspace node into a disk-ready YAML string for local use, enabling preview of generated SQL without extra round-trips.
Instructions
Fetch a workspace node from the cloud and convert it to the on-disk coa YAML shape (the nodes/*.yml format). Returns both the parsed disk-shape object and a YAML string ready to write to disk.
Use this when an editor or local-dev workflow needs the disk representation of a cloud node — for example, to drop the YAML into a coa project and run coa create --dry-run to preview the generated SQL without an extra round-trip.
The conversion handles the schema diff (top-level → operation: wrapper, nodeID/columnID → stepCounter/columnCounter, sources[] → sourceColumnReferences[], synthesized columnReference per column, fileVersion: 1 header).
UUIDs round-trip; a node serialized this way and pushed back via parse_disk_node_to_workspace_body produces the same cloud body. The converter is lossy on cloud-only metadata (createdAt, updatedAt, etc.) — those are dropped.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeID | Yes | The node ID to serialize. | |
| workspaceID | Yes | The workspace ID containing the node. |