The Hierarchy_Flattening transform

Sometimes, hierarchical data is not represented by nested (hierarchical) data structures but is actually stored within a simple flat structure in normal database tables or flat files. The simplest form of hierarchical relationships in data can be presented as a table that has two fields: parent and child.

Look at the example of folder hierarchy on the disk (as shown in the following figure). The structure on the left is visually simple to read and understand. You can easily see what is the root folder and what are the leaves, and can easily highlight the specific branch you are interested in.

The Hierarchy_Flattening transform

The table on the right ...

Get SAP Data Services 4.x Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.