Add a hierarchy

Add a hierarchy

  1. Access the HIERARCHIES pipeline tab.

  2. Click + Hierarchy.

Set hierarchy properties

When a hierarchy is selected in the HIERARCHIES pipeline tab, its properties are displayed on the Properties panel.

Rename a hierarchy

Change a selected hierarchy name directly in the Properties panel.

Define a hierarchy description

Specify a description for a hierarchy using the corresponding text box in the Properties panel. (This appears when a hierarchy is selected in the HIERARCHIES pipeline tab).

Add a level to a hierarchy

Note

Levels must be in the order you require. You can add the primary key field as the last (lowest) level if you wish, but this is not necessary.

  1. Verify that you have selected a hierarchy in the HIERARCHIES pipeline tab.

  2. In the Levels area of the Properties panel, click + Level.

  3. Select a level. The selected level is added and a drop-down, representing the level, appears above the + Level button.

  4. From the newly added drop-down list, choose the field from which to create the level.

  5. Click Save.

Add a parent-child hierarchy

You can create a parent-child hierarchy provided you have Parent ID columns in the pipeline corresponding to the columns in the primary key.

In this example, the following details have been pre-configured:

  • A second, BASIC step (called Data per company) has been added to the pipeline.

  • A parent-child hierarchy exists between the Account and MAINACCOUNTID columns.

  • The MAINACCOUNTID column has been defined as the primary key (marked with a blue key icon).

  • The Account column acts as the Parent ID column.

  1. Click the Account column to view the parent-child hierarchy setting.

  2. View the Display Type property (in Properties panel).

Note

  • The hierarchy's join is from a single primary key column to a single Parent ID column.

  • The MAINACCOUNTID column is a single key column (denoted by the blue key icon).

  • There are no additional keys denoted by yellow key icons and the Account column is also a single column.

Add a multi-column parent-child hierarchy

  1. Add an additional column to the primary key column to create a composite key.

    Note

    Columns in a parent-child hierarchy must have the same number of key columns. Therefore, a key column needs to be added to the Account column.

  2. Add an additional column (e.g. MAINACCOUNTRECID) to the Account column.

  3. Click the Account column to select it.

    1. In the Additional key columns text box in the Properties panel, begin typing the name of the additional key column.

    2. Click the MAINACCOUNTRECID column to add it. The column appears in the Additional key columns text box. The Account column now has the same number of key columns as the MAINACCOUNTID column. However, there is an issue, and the error icons (red exclamation points) are displayed.

  4. Examine one of the error icons by hovering over it and view the error message.

    Note

    • For a parent-child hierarchy to work, the field types must match and be in the same order.

    • In this example, MAINACCOUNTID and Account are already both string-type columns, so their data types match. The new additional key column, DATAAREA, is also a string-type column, so a string-type column must also be added to Account. However, the key column that was added, MAINACCOUNTRECID, is an integer-type column.

    • This pattern is important. If the primary column was a floating-point number and the additional was an integer, the other column in the hierarchy would need to have a floating-point number main column with an integer as its additional column.

    • Therefore, although the number of columns match, the type does not match. This can be solved by adding a different, string-type column to the Account column.

  5. Remove the MAINACCOUNTRECID column.

    1. Verify that the Account column is selected (highlighted).

    2. In the Properties panel, hover over the right side of the MAINACCOUNTRECID entry in the Additional key columns text box.

    3. Click Delete to remove the column.

    4. In the Properties pane, begin typing ParentDataArea in the Additional key columns text box. All columns that match the name you type of displayed.

    5. Click ParentDataArea to add it. The column appears in the Additional key columns text box. Error messages are no longer displayed.

  6. Add an appropriate column (e.g. ParentDataArea representing the parent account's company).

  7. Click Save and close.

  8. Reopen the pipeline.

  9. Click the BASIC (Data per company) step.

    1. In the Properties pane, begin typing ParentDataArea in the Additional key columns text box. All columns that match the name you type of displayed.

    2. Click ParentDataArea to add it.

    3. The column appears in the Additional key columns text box. Error messages are no longer displayed.

  10. Columns are now reordered:

    1. DATAAREA is shown beneath MAINACCOUNTID and it is indented, as occurs with all additional keys.

    2. ParentDataArea is shown beneath Account and is indented, as it is an additional key of the Parent ID.

  11. The parent-child hierarchy is valid, as the column number and column types are identical and in the same order.