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:
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:
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 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: