Apply Join Condition
apply_join_conditionWrites JOIN conditions for nodes with multiple predecessors by detecting common columns, supporting custom join types, WHERE, and column overrides.
Instructions
Write a FROM/JOIN/ON clause to a workspace node's sourceMapping.join.joinCondition by analyzing predecessor columns and generating the join automatically.
Use this for multi-predecessor nodes where you need to combine data via JOIN. The tool inspects predecessor columns, finds common column names for ON conditions, and writes the full joinCondition to the node.
Args:
workspaceID (string, required): The workspace ID
nodeID (string, required): The node ID of the multi-predecessor node
joinType (enum, optional): 'INNER JOIN' | 'LEFT JOIN' | 'RIGHT JOIN' | 'FULL OUTER JOIN'. Defaults to INNER JOIN
whereClause (string, optional): WHERE filter to append after the JOIN (without the WHERE keyword)
qualifyClause (string, optional): QUALIFY clause to append (without the QUALIFY keyword)
joinColumnOverrides (array, optional): Explicit column mappings when column names differ across predecessors. Each entry: { leftPredecessor, rightPredecessor, leftColumn, rightColumn }
Returns: { nodeID, joinCondition, warning?, validation? }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeID | Yes | The node ID of the multi-predecessor node | |
| joinType | No | Type of JOIN to use between predecessors. Defaults to INNER JOIN. | |
| whereClause | No | Optional WHERE clause to append after the JOIN (without the WHERE keyword). | |
| workspaceID | Yes | The workspace ID | |
| qualifyClause | No | Optional QUALIFY clause to append (without the QUALIFY keyword). | |
| joinColumnOverrides | No | Explicit column mappings for joins when column names differ across predecessors. Overrides auto-detected common columns for the specified predecessor pair. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeID | No | ||
| created | No | ||
| warning | No | ||
| nextSteps | No | ||
| validation | No | ||
| joinSuggestions | No | ||
| configCompletion | No | ||
| nodeTypeValidation | No | ||
| configCompletionSkipped | No |