Skip to main content Skip to complementary content

Creating and configuring the flattening map

Generate a multi-ouptut flattening map from your input structure.

For more information about flattening maps, see Creating a flattening map.
Information noteNote: This feature is available only if you have installed the R2021-04 Studio monthly update or a later one delivered by Talend. For more information, check with your administrator.

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 input structure that you created and click Next.
  5. Select a folder and enter a name for the new structure, then click Next.
  6. Select the Multi-output radio button.
  7. Clear the check boxes for all nodes except mondial and country.
    You can select all elements from continent to langtree, then right-click and click Unselect.
  8. Expand the country node and select the check box in the Output column for the country, city and province nodes, then click Next.
  9. Configure the country output:
    1. Right-click the country node and click Set Pivot.
    2. Clear the check boxes for the nodes that you want to remove from the output.
      By default, only loops are displayed. You can display other nodes by clicking the Filter primitive nodes button.
    3. If needed, update the Max Occurs for the elements that you want to keep.
  10. Use the drop-down list to switch to the city output and configure it as follows:
    1. Right-click the city node and click Set Pivot.
    2. Clear the check boxes for all primitive fields under country, except for country/Attributes/car_code, then click the button to apply this selection to the next output.
      This data is already available in the first output so it can be removed from the others. The car_code can be used to identify the country in all outputs.
    3. Clear the check boxes for the nodes under city that you want to remove from the output.
    4. If needed, update the Max Occurs for the elements that you want to keep.
  11. Switch to the province output and configure it as follows:
    1. Right-click the province node and click Set Pivot.
    2. Clear the check boxes for the nodes under province that you want to remove from the output.
    3. If needed, update the Max Occurs for the elements that you want to keep.
  12. Click Next and clear the Create Studio schemas from the flattened structure for each output check box, then click Finish.

Results

Your map is generated, you can now use it in a Job.

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!