Introduction to hierarchies in NextTables
What a hierarchy view is, parent-child versus directory, node types, the data node and text nodes, validity and the reference date, and the choices fixed at creation.
You will learn
- What a hierarchy view is and which tables it creates in your database.
- How a parent-child hierarchy differs from a hierarchy with a directory, and which one fits your data.
- What node types, the data node and text nodes are.
- Which tables and columns land in your database, and how NextTables terms map to SAP terms.
- How validity periods and the reference date make a hierarchy time-dependent.
- Which choices are fixed once the hierarchy exists, and what hierarchies don't do yet.
This article is for data platform owners, controllers and application builders who plan a hierarchy before they create it. It explains the concepts and the tables a hierarchy creates; the how-to articles linked below walk through each task. A good reading order is this article, then the creation article for your scenario (directory or parent-child), then maintaining, time-dependent hierarchies, texts and your own fields.
Prerequisites
- A database connection that NextTables can write to. Every table of a hierarchy is created in that database. See How to create a database connection to SAP Datasphere or How to create a database connection to Databricks.
- The Create table permission on the folder where the hierarchy will live.
- Optional: master data objects for the fields that identify your nodes, so the tree shows names instead of codes. See How to create and use master data objects in NextTables.
What a hierarchy view is
A hierarchy view shows data as a tree. Each node sits under a parent, and the tree can be expanded, searched and rearranged by drag and drop. You create a hierarchy view in a folder with Create hierarchy view..., and NextTables creates the tables behind it in the database you pick. The tables are ordinary tables: your data platform reads them like any other table in that database.
Next to the tree, the hierarchy view shows your own fields as columns, for example an owner or a planning value per node. You edit them inline, the same way you edit cells in a grid view.

Parent-child or directory: which scenario to choose
When you create a hierarchy view, you pick one of two scenarios. The choice is fixed once the view exists.

| Parent-child | Directory | |
|---|---|---|
| In the product | "One table where each row links a node to its parent" | "Several hierarchies and node types in one place" |
| Tables created | One table | A structure table, a directory table and, when you use text nodes, a text nodes table |
| Hierarchies per view | One, named after the view | As many as you add to the directory |
| Kinds of node | All nodes are identified by the same fields | Several node types, each identified by its own fields, plus optional text nodes |
| Validity | Optional, on the table | Optional, chosen per table |
| Language texts | No | Optional, on the text nodes table |
| Good fit for | One tree where group nodes are values of the same fields as the leaves, for example an organization chart or groups kept in the cost center column itself | Several named hierarchies of the same kind, mixed levels such as group nodes above cost centers, and tables on which a hierarchy with directory can be modeled in SAP Datasphere |
The steps for each are in How to create a parent-child hierarchy in NextTables and How to create a hierarchy with a directory.
Nodes, node types and the data node
In a parent-child hierarchy, every row of the table is a node. The identifying fields you define, for example a cost center, name the node, and a matching set of parent fields names its parent. A row whose parent fields are empty is a root. Any node can have children, so group nodes are values of the same fields as the leaves. If your groups are separate master data, such as cost center groups, use a hierarchy with a directory.
In a hierarchy with a directory, you define node types. Each node type has a Node type value, a Node name and its own identifying fields:
- Data node: exactly one node type is the data node, "the node type that holds your data", for example the cost center. Data nodes are the leaves of the tree and can't have children.
- Nodes identified by a key: any other node type with identifying fields, for example a cost center group that exists as master data. These nodes can have children.
- Text node: at most one node type can be the text node. A text node "groups other nodes; its name comes from the text nodes table". You give it a Node ID, and its label comes from the text nodes table, optionally per language.
💡 Tip: Use a text node for a grouping level that has no master data of its own, for example "Sales regions" above your profit centers. Use a node type with a key for a grouping level that already exists as master data, for example profit center groups.
Each node shows its name: the text of the master data object bound to its identifying fields, or the text from the text nodes table. Without either, the tree shows the key or the Node ID.
Validity and the reference date
Each table of a hierarchy can include validity: a Valid from and a Valid to field. Both dates count as part of the period, and an empty Valid to means the row has no end date. If a reporting tool filters by key date, keep Valid to required and use December 31, 9999 for an open end, as new nodes do. With validity, one node can sit under different parents in different periods, for example after a reorganization at the start of a fiscal year.
A hierarchy view with validity has a Reference date in its toolbar. It starts at today, and the tree shows the rows valid on that date. Change it to see the hierarchy as it was, or as it will be. In a directory, each hierarchy can also have its own validity, and the hierarchy switch groups them into "Valid on" the reference date and "Not valid on this date".
To keep a new version of a hierarchy, for example for the next fiscal year, add it to the directory as a new hierarchy with its own Hierarchy ID, such as ORG-2027 next to ORG-2026, and give each its own validity. Details are in How to work with time-dependent hierarchies.
What lands in your database
NextTables creates ordinary tables in the database you pick. The default column names below can be changed in the last steps of the wizard.

| Table | Columns | Key |
|---|---|---|
| Parent-child table | Your identifying fields (the node), the matching parent fields, SORT_ORDER*, VALID_FROM and VALID_TO*, your own fields | Identifying fields (+ VALID_FROM) |
| <prefix>_STRUCTURE | HIERARCHY_ID, NODE_ID, PARENT_ID, NODE_TYPE, the key columns of each node type with a key (filled only on rows of that type), SORT_ORDER*, VALID_FROM and VALID_TO*, your own fields | HIERARCHY_ID + NODE_TYPE + NODE_ID (+ VALID_FROM) |
| <prefix>_DIRECTORY | HIERARCHY_ID, NAME, VALID_FROM and VALID_TO*, your own fields | HIERARCHY_ID (+ VALID_FROM) |
| <prefix>_TEXT_NODES | NODE_ID, LANGUAGE*, TEXT, VALID_FROM and VALID_TO*, your own fields | NODE_ID (+ LANGUAGE) (+ VALID_FROM) |
* Only when switched on in the wizard.
- A root has empty parent fields. If other tools load rows into the table, write NULL for a root's parent rather than an empty string.
- For a node with a key, NextTables generates its NODE_ID and keeps it in every period; the node's key is stored in its node type's own columns. For a text node, NODE_ID is the Node ID you type.
- PARENT_ID always holds the parent's NODE_ID.
- Texts are keyed by NODE_ID and belong to no single hierarchy, so every hierarchy that uses a Node ID shares its texts.
- SORT_ORDER is a whole number that orders the children of one parent, in steps of 100. Tools that read the tables sort by it themselves.
How the tables are used on your data platform
NextTables creates tables and leaves the semantic modeling to your data platform. In SAP Datasphere, the tables can be used as follows:
| NextTables table | Can be used in SAP Datasphere as |
|---|---|
| Directory table | The directory of a hierarchy with directory |
| Structure table | A hierarchy with directory, with HIERARCHY_ID, NODE_ID, PARENT_ID and NODE_TYPE, and each node type's key column associated with its dimension |
| Text nodes table | A text entity for the text nodes, with LANGUAGE as the language column |
| Parent-child table | A parent-child hierarchy on the dimension of the identifying fields |
Databricks and PostgreSQL have no hierarchy object of their own: a recursive query over the node and parent columns reads the tree. For reading NextTables tables in SAP Datasphere in general, see How to consume NextTables data in SAP Datasphere.
NextTables terms and their SAP counterparts
| NextTables | SAP counterpart |
|---|---|
| Data node | Leaf node type: the members of the dimension (SAP BW: the characteristic values) |
| Node type with a key | Node type associated with its own dimension (SAP BW: external characteristic node) |
| Text node | Text node (SAP BW: 0HIER_NODE) |
| Node type value | Value in the NODE_TYPE column |
| Hierarchy ID | Hierarchy name in the hierarchy directory |
| Reference date | Key date |
| Valid from / Valid to | DATEFROM / DATETO, both dates included |
| A new version of a hierarchy | A new hierarchy with its own Hierarchy ID |
What is fixed once the hierarchy exists
⚠️ Caution: Decide these before you select Create hierarchy. They can't be changed afterwards:
- The scenario: parent-child or directory.
- The identifying fields, the parent and child fields, and the database.
- Include sort order: without a sort order, nodes can be moved to another parent but can't be reordered among their siblings.
- Include validity, per table.
- Which node type is the data node, once the hierarchy has nodes, and which node type is the text node.
You can still add your own fields, add, rename or remove node types, and change everything inside the hierarchy itself. See How to add your own fields to a hierarchy.
Who can do what
A hierarchy view uses the same view permissions as a grid view.
| Task | Permission |
|---|---|
| Create a hierarchy view | Create table on the folder |
| Browse and search the tree | View data |
| Add nodes, add hierarchies, add texts | Add data |
| Move nodes, edit fields, edit hierarchies and texts | Edit data |
| Delete nodes and texts | Delete data |
| Delete a whole hierarchy, or more than 30 rows at once | Delete all |
| Change node types and fields | Edit table |
What hierarchies don't do yet
- Row-level security and filters can't be configured for a hierarchy view. Their entries in View settings are greyed out.
- A hierarchy view can't be transported. A transport package that contains one is refused on import.
- Fields in other views can't pick their values from a hierarchy yet.
- On a given date, each node sits under exactly one parent. Link nodes (the same node under several parents) and intervals (a range of leaf values under one node, as in SAP BW) are not supported.
- Nodes without a parent on the reference date are not shown in the tree. A notice above the tree says how many there are. They stay in the tables, where SAP Datasphere, SAP Analytics Cloud and other tools handle them by their own rules, so resolve them before the hierarchy is used in reports.
Troubleshooting / FAQs
1. Where do I find Create hierarchy view?
Open the menu of a folder in the views sidebar, or the menu next to Views at the top of the sidebar, and select Create hierarchy view.... If the entry is missing, your role lacks the Create table permission on that folder.
2. Can I turn an existing table into a hierarchy view?
No. A hierarchy view always creates its own tables in the database you pick.
3. How does my data platform read the hierarchy?
The hierarchy is stored in ordinary tables of your database, described above under "What lands in your database". A hierarchy with directory can be modeled on them in SAP Datasphere; on Databricks and PostgreSQL, a recursive query reads the tree.
4. I need sort order or validity, but I didn't include it.
Both can only be chosen when the hierarchy is created. Create a new hierarchy view with the option switched on and load the data into it.
5. For which systems can I maintain hierarchies with drag and drop?
Hierarchies work on SAP Datasphere, Databricks and PostgreSQL. Snowflake, Microsoft Fabric and Dremio are on the roadmap.


