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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.