Table of Contents

Search

  1. Preface
  2. Mappings
  3. Mapplets
  4. Mapping Parameters
  5. Mapping Outputs
  6. Generate a Mapping from an SQL Query
  7. Dynamic Mappings
  8. How to Develop and Run a Dynamic Mapping
  9. Dynamic Mapping Use Cases
  10. Mapping Administration
  11. Export to PowerCenter
  12. Import From PowerCenter
  13. Performance Tuning
  14. Pushdown Optimization
  15. Partitioned Mappings
  16. Developer Tool Naming Conventions

Developer Mapping Guide

Developer Mapping Guide

Mapping Outputs Overview

Mapping Outputs Overview

A mapping can return mapping outputs. A mapping output is a single value that is the result of aggregating a field or expression from each row that the mapping processes.
A mapping output returns a value that provides information about the mapping run. For example, a mapping output can return the number of error rows that the mapping found. A mapping output can return the latest order date that the mapping processed and the total amount of all the orders.
Transformations do not receive the mapping output values. The mapping returns each mapping value when the mapping completes. You can pass mapping outputs to other tasks in the workflow. You can save the values to use as input parameters the next time a mapping runs. You can define multiple mapping outputs in the same mapping.
A mapping can return user-defined mapping outputs or system-defined mapping outputs.
User-defined mapping outputs
A user-defined mapping output is a numeric value or date that a mapping returns by aggregating a field or expression from each row in the mapping. For example, you might need to know when orders reach a specific threshold. You can configure the mapping to return the total order amount that the mapping processed. Define a mapping output called TotalOrderAmt and configure the mapping to summarize the Order_Amount field from every row. Define an expression or port name to aggregate in an Expression transformation.
System-defined mapping outputs
A system-defined mapping output is a built-in value that the mapping always returns whenever the mapping completes. The mapping returns the number of source rows, the number of target rows, and the number of error rows that the mapping processes. You might pass these values in workflow variables to another task in a workflow, such as a Notification task or an Exclusive Gateway task. You do not have to define a system-defined mapping output.
Perform the following tasks with mapping outputs:
Save the mapping output in the repository
You can configure a Mapping task to persist a mapping output value in the repository. You can assign a persisted mapping output value to a Mapping task input. For example, you can configure the mapping to return the latest sequence number that it generated. Persist a Last_Seq_Num mapping output in the repository. The next time the mapping runs, you can use Last_Seq_Num as an the starting sequence number.
Bind outputs to workflow variables
You can bind mapping outputs to workflow variables and then pass the values to other tasks in a workflow. You can bind mapping outputs from the current Mapping task run to workflow variables. You can also bind persisted mapping outputs from a previous Mapping task run to workflow variables in the current run.

0 COMMENTS

We’d like to hear from you!