Developer Workflow Guide > Mapping Task > Mapping Task Output
  

Mapping Task Output

Mapping task output is the data that passes from a Mapping task to workflow variables.
Mapping tasks return the following types of output:
General Outputs
The start time, end time, and whether the task succeeded.
System-defined Outputs
The number of error rows, source rows, and target rows that the mapping processed.
User-defined Outputs
Mapping outputs that you define to aggregate fields or expressions from each row in the mapping. Persisted user-defined outputs are values that the Data Integration Service saved to the repository from a previous workflow run. Current values are mapping output values from the current workflow run.
Configure the Mapping task output values that you want to assign to workflow variables on the Output tab. The Data Integration Service copies the Mapping task output values to workflow variables when the Mapping task completes.
The following image shows some mapping outputs on the Mapping task Output tab:
The Output tab image shows the system defined user outputs and the user-defined mapping outputs. The example included one persisted value called Last Order Date. It is not assigned to a workflow variable. The image shows 2 current value mapping outputs: Total Order Amount and Last Order Date. Total Order Amount is assign to a workflow variable called wf_Variable_Total_OrderAmt.
To assign a workflow variable to a Mapping task output, click the Variable column. Choose a workflow variable to assign the output to. In the example image, the Total_OrderAmt mapping output from the current workflow run is bound to the workflow variable wf_Variable_Total_orderAmt.
If a task fails, the Data Integration Service copies the general task output values but not the task specific output values to workflow variables. If the task aborts, the Data Integration Service does not copy any task output value to workflow variables.

Example

A Mapping task includes a number of error rows output value that captures the number of rows that the mapping failed to process. To use the data in the remainder of the workflow, you assign the number of error rows output to a workflow variable named MappingErrorRows. Then you can add the MappingErrorRows workflow variable in an expression for an outgoing sequence flow from an Exclusive gateway. If MappingErrorRows contains a value greater than zero, the gateway takes one branch. If the value equals zero, the gateway takes the other branch.

System-Defined Mapping Outputs

A mapping can return system-defined outputs. You can use the mapping output in subsequent run of the workflow or by the next task in the workflow.
A mapping or transformation can return system-defined outputs. You can use the mapping output in subsequent run of the workflow or by the next task in the workflow.
For instance, a transformation can return a system-defined output, numberOfErrorRows, that contains the number of records that were invalid. You might review this information to monitor a process or to understand the quality of the data that a mapping processes.
The following table describes the output data produced by the Exception transformation in the mapping:
Transformation
Output Data
Datatype
Description
Exception
exceptionLoadCount
Integer
Number of records that contain unresolved data quality issues and require a manual review. The records may contain errors, or they may contain duplicate information.
The Developer tool lists a single instance of the exceptionLoadCount output even if the mapping contains multiple Exception transformations. Assign the exceptionLoadCount output to a workflow variable if the mapping contains a single Exception transformation. Otherwise, unexpected behavior may occur.