Advanced Patterns
This page covers techniques for specific scenarios that go beyond the standard recommended approach. These are not default patterns — use them when the situation calls for it.
Writing All Results at Once
PostgreSQL
INSERT INTO target_table (col1, col2)
SELECT r->>'col1', r->>'col2'
FROM json_array_elements('{collect.value}'::json) AS rSQL Server
INSERT INTO target_table (col1, col2)
SELECT col1, col2
FROM OPENJSON('{collect.value}')
WITH (col1 VARCHAR(100) '$.col1', col2 VARCHAR(100) '$.col2')MySQL (8.0+)
INSERT INTO target_table (col1, col2)
SELECT col1, col2
FROM JSON_TABLE('{collect.value}', '$[*]'
COLUMNS (col1 VARCHAR(100) PATH '$.col1', col2 VARCHAR(100) PATH '$.col2')
) AS rOracle (12c+)
Snowflake
Sharing Data Across Flow Boundaries
How It Works
Using correlationId as the Table Name
correlationId as the Table NameCreate staging table at the start of main flow (Single-Row):
Each subflow inserts its results (Single-Row, inside loop):
Copy to final table and clean up (Single-Row, end of main flow):
Using correlationId as a Table Field
correlationId as a Table FieldStaging table structure (created once, not per execution)
Each subflow inserts with correlationId (Single-Row, inside loop)
Copy only this execution's rows to final table (Single-Row, end of main flow)
Clean up only this execution's rows (Single-Row, end of main flow)
Last updated
Was this helpful?

