Configure the field mapping in a Hierarchy Parser transformation to define which schema elements provide the relational output. Configure the field mapping on the Field Mapping tab of the Properties panel. Use the field mapping editor to select or exclude schema elements. When you exclude schema elements, the editor removes the corresponding relational fields.
The following image shows the field mapping editor.
To the left, the field mapping editor shows the schema elements. To the right, the editor shows the relational fields. The transformation creates a separate output group for each multiple-occurring input element. The transformation also creates primary and foreign keys and assigns them to the groups. A primary key is signified by the prefix PK_ in the name of the field. A foreign key is signified by the prefix FK_.
For each relational field, the Relational Fields panel shows the XPath expression of the hierarchy element from which the relational field was mapped.
When you select to include schema elements, the editor displays corresponding relational fields to the right. When you exclude schema elements, the editor removes the corresponding relational fields.
You can select to include or exclude all child elements nested under an element. Alternatively, you can select to include or exclude immediate child elements that are one hierarchy level down.
You can select to denormalize relational output. When you denormalize relation output, all the hierarchy elements you select to map are mapped to relational fields in one group.
You can delete relational fields and groups. When you delete a group whose primary key serves as a foreign key for other groups, the editor updates or deletes the other groups. If the group you deleted was a reflection of a repeating element nested within another repeating element, the primary key for the higher level repeating element becomes the foreign key for the other groups. If the group you delete is a reflection of the highest level repeating element, the editor deletes all the groups.
Selecting the elements to convert
Select the schema elements to convert to relational output fields.
1In the Properties panel of the Hierarchy Parser transformation, click the Field Mapping tab.
The field mapping editor displays the transformation input elements and output fields. To the left, the editor shows the schema elements. To the right, the editor shows the relational output fields.
2 To view child elements, expand an element.
3To search for an element, enter the characters to search for in the Search field, and click Search.
4To denormalize the relational output, in the Format field select Denormalized, then select elements to include in the relational output. By default, the relational output is not denormalized, and the setting for the Format field is Relational.
5 To include an element without child elements in the relational output, select the element.
6 To exclude an element without child elements from the relational output, clear the element.
7 For an element with child elements, you can choose from the following options:
- To select to include all child elements in the relational output, right-click the element and select Map all descendants.
- To select to include immediate child elements in the relational output, right-click the element and select Map immediate children.
- To select to exclude all child elements in the relational output, right-click the element and select Unmap all descendants.
- To select to exclude immediate child elements in the relational output, right-click the element and select Unmap immediate children.
8To search for a relational field, enter the characters to search for in the Search field, and click Search.
9 To exclude a relational output field from the output, click the field.