Replace Workspace Node Columns
replace_workspace_node_columnsReplace all columns in a workspace node with a new set of columns, optionally applying a WHERE filter and additional changes.
Instructions
Replace all columns in a workspace node with a new set of columns, optionally applying a WHERE filter and additional changes in a single call.
Do not use overrideSQL or override.* fields; SQL override is disallowed in this project.
Use this when:
Applying column transforms (UPPER, LEFT, COALESCE, etc.) after node creation
Adding WHERE filters at the same time as column transforms
Converting from a simple join to GROUP BY aggregation
Completely replacing column definitions with aggregate functions
Prefer this over separate update_workspace_node calls. Combine column replacement + WHERE filter in one call.
Example: Apply transforms and filter in one call: { columns: [ { name: 'CUSTOMER_ID', transform: '"CUSTOMER_LOYALTY"."CUSTOMER_ID"' }, { name: 'CITY', transform: 'UPPER("CUSTOMER_LOYALTY"."CITY")' }, { name: 'CONTACT_INFO', transform: 'COALESCE("CUSTOMER_LOYALTY"."E_MAIL", "CUSTOMER_LOYALTY"."PHONE_NUMBER")' } ], whereCondition: '"CUSTOMER_LOYALTY"."CUSTOMER_ID" IS NOT NULL AND ("CUSTOMER_LOYALTY"."E_MAIL" IS NOT NULL OR "CUSTOMER_LOYALTY"."PHONE_NUMBER" IS NOT NULL)' }
IMPORTANT: Use whereCondition for WHERE filters — do NOT construct {{ ref() }} syntax yourself. The FROM clause is already set up from node creation. The whereCondition is appended to the existing joinCondition automatically.
Args:
workspaceID (string, required): The workspace ID
nodeID (string, required): The node ID
columns (array, required): Complete new columns array
whereCondition (string, optional): WHERE filter to append
additionalChanges (object, optional): Additional fields to update
Returns: { nodeID, warning?, validation? }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeID | Yes | The node ID | |
| columns | Yes | Complete new columns array to replace metadata.columns. Each column should include name and may include transform, dataType, description, nullable, sources, and other hydrated metadata fields. | |
| workspaceID | Yes | The workspace ID | |
| whereCondition | No | Optional WHERE filter to append to the node's existing joinCondition. Just provide the condition — do NOT include the WHERE keyword or construct {{ ref() }} syntax. The FROM clause is already set from node creation. Example: '"LOCATION"."LOCATION_ID" IS NOT NULL AND "LOCATION"."LOCATION_ID" != 0' | |
| additionalChanges | No | Optional additional fields to update, such as name, description, config, or metadata. Object fields are deep-merged; arrays are replaced. Do NOT include metadata.sourceMapping or customSQL — use whereCondition for WHERE filters, apply_join_condition for join setup, or convert_join_to_aggregation for GROUP BY patterns. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeID | No | ||
| created | No | ||
| warning | No | ||
| nextSteps | No | ||
| validation | No | ||
| joinSuggestions | No | ||
| configCompletion | No | ||
| nodeTypeValidation | No | ||
| configCompletionSkipped | No |