Relational to Hierarchical Transformation Development
Use the New Transformation wizard to auto-generate a Relational to Hierarchical transformation. Choose a schema or hierarchical sample file to define the output hierarchy.
Creating the Relational to Hierarchical Transformation
1. In the Developer tool, click File > New > Transformation.
2. Select the Relational to Hierarchical transformation and click Next.
3. Enter a name for the transformation and browse for a Model repository location to put the transformation and click Next.
4. To select a schema, select one of the following methods:
- - To use a schema from the Model repository to define the output hierarchy, near the Schema Object field, browse to select the schema file from the repository.
- - To import a schema file, click Create a new schema object. In the New schema object window, you can browse to and select a schema file, or you can select to create a schema from a sample hierarchical file.
5. Choose the root for the output hierarchy. In the Hierarchy root dialog box, select the element in the schema that is the root element for the output hierarchical file. To help select the root object, you can add a sample hierarchical file. To add a sample file, near the Sample File field, browse for and select the file from the file system.
6. Click Finish.
The wizard creates the transformation in the repository.
Creating the Ports
Configure the ports in the Overview view.
1. To view the mapping, in the Overview view Ports area, select Input Mapping.
2. Select the input port type, precision and scale.
3. Expand the trees in the Ports grid. To the left, the Transformation input panel shows the relational input, and to the right, the Transformation output panel shows the expected hierarchical output.
4. To define a node as a root, click Choose Hierarchy.
The Developer tool displays only the nodes from the root level and below the root level in the Transformation input area.
5. To view lines that connect the ports with the hierarchical nodes, click Show Lines. Select to view all the connection lines or just the lines for selected ports.
6. To add an input group or port to the Transformation input area, use one of the following methods:
- - Drag a simple or complex element in the Transformation output area to an empty column in the Transformation input area. If the node is a group node, the Developer tool adds a relational group without ports.
- - To add a relational group, select a row and right-click to select New > Group.
- - To add a relational port, right-click to select New > Field.
7. To clear the hierarchical node settings for locations of ports, use one of the following methods:
- - Select one or more nodes in the Transformation output area, right-click and select Clear.
- - Select one or more lines that connect the relational input ports to the hierarchical nodes, right-click and select Delete.
8. To display the output ports in a hierarchy, click Show As Hierarchy. Each child group appears underneath the parent group.