Skip to main content Skip to complementary content

Creating a flattening map with a single output

Before you begin

  • You have created a hierarchical structure.

About this task

In this example, the input hierarchical structure looks like this:

Procedure

  1. In the Data Mapper tab of the Mapping perspective, right-click Maps in Hierarchical Mapper and click New > Map.
  2. Select Flattening Map - Create a map which flattens an input structure and click Next.
  3. Select a folder and enter a name for the map, then click Next.
  4. Select the structure that you want to flatten and click Next.
  5. Select a folder and enter a name for the new structure, then click Next.
  6. Optional: Change the pivot by right-clicking the relevant node and clicking Set Pivot.

    The pivot is a path of nodes that starts at the root node and ends at a leaf node. The selected pivot determines the number of rows in the flattened structure.

    You can also remove a node from the pivot by right-clicking it and clicking Remove From Pivot.

  7. Optional: Change the value of the Max Occurs attribute for elements that are not in the pivot.
    • Click the Set Max Occurs for all repeatable elements button to change the value for all repeatable elements.
    • Select one or several nodes and right-click them, then select Set Max Occurs and enter a number. You can select the Apply max occurs to descendant(s) check box if you want to apply this setting to all the descendants of the nodes you selected, then click OK.
  8. Optional: Click the Filter primitive fields button to disable the filter and show all non-looping elements.
    This filter is enabled by default and all primitive fields are included in the output structure. If you want to exclude some of these elements, you can disable the filter and clear the relevant check boxes.
  9. Click Next, and select the Max length of column names check box if you want to set a custom maximum length for the output elements names.
    If an element name exceeds the maximum length, it will be truncated until it fits the limitation. For more information, Flattened structure naming.
  10. Select the Create a Studio schema from the flattened structure check box if needed, then click Finish.
    Information noteNote: If you select this check box, the output structure will use the Map representation by default. If you clear it, the output will use the CSV representation.

Results

Your map and your flattened output structure are created in the selected folders.

The name of the elements in the output structure is defined based on the name of the corresponding input element. If there are any duplicate element names, a prefix or suffix is added to differentiate them. For more information, see Flattened structure naming.

The map opens and the elements from the input structure are automatically mapped with the elements in the flat output structure.

In this example, it looks like this:

If you selected Create a Studio schema from the flattened structure, a schema containing the same columns is created. You can find it in your Repository in the Integration perspective, under Metadata > Generic schemas.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!