Output and Correlations
The Output tab on a Migrate Records step configures what happens after records have been extracted, transformed, and loaded. It provides two key capabilities: output variables for capturing execution results, and table correlations for tracking source-to-target ID relationships.
Output Variables
Output variables capture information at the end of a step's execution and make it available to all subsequent steps in the procedure. They are the primary mechanism for passing data between steps.
What Output Variables Can Capture
Each output variable has a Type that controls the shape of the captured value. Only records that migrated successfully (status CREATED or UPDATED) contribute to the outputs.
| Type | Shape | Example Use |
|---|---|---|
| List of values from mapped target field | List of one mapped target field's values | Collecting values written to the target (e.g. all assigned state values) |
| List of values from insert endpoint response parameter | List of values from the target API's insert response | Capturing server-generated values such as ticket numbers (API targets only) |
| List of source record IDs | List of source primary-key values | Tracking which source records succeeded, e.g. to mark them as processed in the source system |
| List of target record IDs | List of target primary-key values | Passing IDs into a subsequent step such as Call API Endpoint |
| Dictionary of source-target record IDs | Dictionary mapping source primary key to target primary key | In-memory ID lookup for use in a formula in a later step |
| Dictionary of custom source-target fields | Dictionary mapping one source field's values to one target field's values | Cross-references that are not keyed by primary key |
For source-to-target ID tracking that can be reused across procedure runs (via the correlation's configured query), use a Table Correlation instead of (or in addition to) the in-memory dictionary outputs above — see Table Correlations below.
Configuring an Output Variable
- Open the Migrate Records step and navigate to the Output tab.
- Click the + button to add a new output variable.
- Give the variable a name — subsequent steps reference it by this name (for example
incident_id_map). - Choose a Type from the list above. For the field-parameterised types, pick the source and target field(s) using the selectors that appear.
- Repeat for any additional outputs needed from the same step.
How Output Variables Flow to Subsequent Steps
Output variables are populated after the step finishes execution. Once populated:
- The variable is added to the procedure's variable scope
- All subsequent steps in the procedure can reference it by name
- Variables persist for the remainder of the procedure's execution
- If a variable with the same name already exists, it is overwritten with the new value
This makes output variables ideal for building pipelines where each step builds on the results of previous steps.
Common Output Variable Patterns
ID Map for child record migration (type: Dictionary of source-target record IDs):
1. Parent step outputs incident_id_map — a dictionary of source sys_id to target sys_id
2. Child step uses a Formula mapping: incident_id_map.get([element_id]) to look up the target parent ID
Migrated target IDs for a follow-up API call (type: List of target record IDs):
1. Step outputs created_target_ids — a list of the target primary-key values created or updated by the step
2. A later Call API Endpoint step iterates over created_target_ids to trigger downstream processing
Captured response value for cross-referencing (type: List of values from insert endpoint response parameter):
1. Step outputs ticket_numbers — values returned by the target API's insert endpoint for each created record
2. A subsequent Assign Variables step builds a source-to-ticket-number mapping for reporting
For counts or success flags derived from a migration, capture one of the lists above and use a formula in a later Assign Variables or Condition step (for example len(@created_target_ids) > 0). The Migrate Records step itself does not expose count or boolean output types directly.
Table Correlations
Table correlations provide a reusable, project-scoped mapping of source-to-target record IDs. They are configured alongside output variables on the Output tab. When enabled, the step writes every source-to-target ID pair into the correlation's in-memory cache as records are migrated.
Correlations are used for:
- Translating reference fields — Child steps use ID mappings to look up target IDs for source references
- Filtering child records — PB can auto-configure child step filters using the parent's correlation cache
- Reusable ID tracking — The cache itself lives only for the duration of a run, but the correlation's configured query continues to identify the same target records on subsequent runs. Output variables, by contrast, are recalculated from scratch every execution and cannot be referenced outside the procedure that produced them.
To enable a table correlation, toggle it on in the Table Correlation section of the Output tab and create or select a correlation name.
For the complete guide to table correlations, see the Table Correlations category, which covers setup, ID mappings, child record filtering, and chaining in detail.
Combining Output Variables and Correlations
It is common to use both output variables and table correlations on the same step:
- Table correlation — For source-to-target ID tracking used by child steps and reused across runs via its configured query
- Output variable (e.g. List of target record IDs or Dictionary of source-target record IDs) — For in-memory data needed by later steps in the current run
These are independent configurations and do not interfere with each other.
Further Reading
- Why Use Table Correlations — Motivation, use cases, and when to enable correlations
- Setting Up Correlations — Detailed setup and configuration guide
- ID Mappings — Using correlations to translate reference fields
- Filtering Child Records — Automatic child filter configuration
- Chaining Correlations — When parent tables have reference fields to other parents
- Child Filter Auto-Configuration — Detailed auto-configuration mechanics on the Migrate Records Filter tab
- Configuring Field Mappings — All mapping types including the ID mapping type
- Output Variables (Getting Started) — Introductory reference on output variable types
Comments
0 comments
Please sign in to leave a comment.