Table of Contents

Search

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

Developer Mapping Guide

Developer Mapping Guide

Example - Rename Generated Ports

Example - Rename Generated Ports

An Expression transformation has three dynamic ports. The "From_Read_Emp" and "From_Read_Emp2" dynamic ports include the generated port "Title." To avoid a name conflict, the Developer tool renames the generated port in "From_Read_Emp2" to "Title1."
The following image shows the renamed generated port Title1 in the Expression transformation:
The mapping contains a Read and an Expression transformation. The Read transformation has six ports. The Expression transformation has three dynamic ports. Two dynamic ports include the generated port Title. The Developer tool renames the generated port in the second dynamic port to Title1.
You link the generated port "Title1" in the Expression transformation to a port "Title1" in the Sorter transformation. You also use "Title1" as the sort key.
The following image shows the link from the generated port in the Expression transformation to the port in the Sorter transformation:
The mapping contains a Read, an Expression, and a Sorter transformation. The Read transformation has six ports. The Expression transformation has three dynamic ports. Two dynamic ports include the generated port Title. The Sorter transformation has a dynamic port and a port. The generated port Title1 in the Expression transformation is linked to a port Title1 in the Sorter transformation.
If you add another link from the port "Title" in the Read transformation to a port "Title" in the Expression transformation, the Developer tool renames the generated ports. The generated port in the "From_Read_Emp" dynamic port is renamed to "Title1." The generated port in the "From_Read_Emp2" dynamic port is renamed to "Title2." The link to "Title1" in the Sorter transformation appears unresolved.
The following image shows the new link between the Read and Expression transformations, the generated ports that the Developer tool renamed in the Expression transformation, and the unresolved link to the Sorter transformation:
The mapping contains a Read, an Expression, and a Sorter transformation. The Read transformation has six ports. The Expression transformation has three dynamic ports and a port. Two dynamic ports in the Expression transformation include the generated port Title. The Sorter transformation has a dynamic port and a port. The Sorter transformation has an unresolved link to the port Title1.
The mapping fails at run time because the generated port that is used as the sort key might not be the intended port to use.
To avoid mapping failure, rename generated ports to ensure that the names are unique within each transformation. For example, you want to trim the leading spaces in the string ports of the "From_Read_Emp" dynamic port. Add a suffix
_trim
to the generated ports. You want to find if the ports in the "From_Read_Emp2" dynamic port have null values. Add a suffix
_isnull
to the generated ports.
The following image shows the generated ports that you renamed in the Expression transformation:
The mapping contains a Read, an Expression, and a Sorter transformation. The Read transformation has six ports. The Expression transformation has three dynamic ports and a port. The generated ports in the Expression transformation are renamed with a suffix. The Sorter transformation has a dynamic port and a port. A generated port in the Expression transformation is linked to a port in the Sorter transformation.

0 COMMENTS

We’d like to hear from you!