Normalizer Transformation Output Groups and Ports
Define output groups and ports in the Overview view of the Normalizer transformation. You can define the output groups after you define the transformation input hierarchy.
The Developer tool generates at least one output group by default. The output group contains all the level 1 fields from the input ports and the first multiple-occurring field. When you define more than one multiple-occurring field in the Normalizer view, the Developer tool creates an output group for each additional multiple-occurring field. You can stop the Developer tool from generating the additional output groups by disabling the Generate First Level Output Groups advanced property.
The following source row contains the customer data, the multiple-occurring sales field, and the multiple-occurring phone field:
CustomerID
LastName
FirstName
Sales (occurs 4 times)
Phone (occurs 3 times)
The Developer tool creates two output groups from the input structure:
Output
CustomerID
LastName
FirstName
Sales
Output1
Phone
GCID_Phone
The Developer tool creates an Output1 group because the source data contains more than one multiple-occurring field. The Developer tool does not create groups for fields that you define in records. When you define records, you must define the output groups that contain the fields in the records.
The following source row contains customer fields and an address record that occurs twice:
CustomerID
FirstName
LastName
Address
Street
City
State
Country
Address1
Street1
City1
State1
Country1
The Developer tool creates an output group that contains the following fields.
CustomerID
FirstName
LastName
The Developer tool creates a default output group for the level 1 customer fields. The default output group does not include the Address record. You must configure how to return the Address data in the output.
Create the output groups based on how you need to structure the output rows. When the source row contains customer data and address data, you can create an output group for the customer fields. You can create another output group for the address fields. Or, you can update the default output group and add the address fields to it. The following examples show different output results based on the output group configuration.
Create an Output Group
Create an output group in the Overview view of the Normalizer transformation.
When you open the Overview view of the Normalizer transformation, the Developer tool shows the default groups it creates from the input hierarchy.
When you create a new output group, a dialog box shows a list of the fields and records in the input hierarchy. Select which fields or records to include in the group.
Output Group Example
The following image shows the New Output Group dialog box:
When you select the Address record, the Developer tool creates a group of output ports that correspond to the fields in the Address record. The Output1 group contains the Street, City, State, and Country ports. You can change the ports in the output group.
The following image shows the Output group and the Output1 group in the Overview view:
You might configure the Normalizer transformation to return the rows from the Output group to a Customer table.
The Customer table receives data similar to the following rows:
100, Robert, Bold
200, James, Cowan
You might return the rows from the Output1 group to an Address table. The Address table receives the Street, City, State, Country, and GCID.
The Address table receives data similar to the following rows:
100 Summit Dr, Redwood City, CA, United States,1
41 Industrial Way, San Carlos, CA, United States,2
85 McNulty Way, Los Angeles, CA, United States,1
55 Factory Street, Los Vegas, NV, United States,2
The GCID identifies which instance of the customer address is in the output row. In this example, the Normalizer transformation returns two instances of the Address record. Each output row contains a GCID value of 1 or 2.
Update an Output Group
You can update a Normalizer transformation output group. You can add or remove the fields in the group.
By default, the Developer tool creates level 1 output groups when you define an input hierarchy. The Developer tool does not include records in the groups. You can update the default output groups and add records to them.
To update an output group, highlight the group name and click New > Update Group. The Edit Output Group dialog box shows the fields in the input hierarchy. Choose which fields to include in the group.
Update Output Group Example
In the previous example, the Developer tool created a default output group with the CustomerID, FirstName, and LastName fields.
The following image shows the default output group:
You can update the default output group and add the Address record to it.
The following image shows the Edit Output Group dialog box:
In this example, the CustomerID, FirstName, and LastName are level 1 nodes. The Address record is also a level 1 node. The Normalizer transformation can return Address in the same row as the customer data. Since Address is multiple-occurring, the Developer tool adds the GCID_Address index to the output gorup.
The following image shows the ports in the Output group:
When the customer fields and the multiple-occurring address fields are in the output group, the Normalizer transformation returns the same customer fields for each instance of the address data.
The following example shows the rows that the Normalizer transformation generates from the output group:
100, Robert, Bold, 100 Summit Dr, Redwood City, CA, United States,1
100, Robert, Bold, 41 Industrial Way, San Carlos, CA, United States,2
200, James, Cowan, 85 McNulty Way, Los Angeles, CA, United States,1
200, James, Cowan, 55 Factory Street, Los Vegas, NV, United States,2
The GCID port contains the Address instance number. The GCID value is 1 or 2.