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.