tree
The Deephaven tree method creates a tree table from a source table given an ID column name and parent column name.
Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
| id_col | str | The name of the ID column. |
| parent_col | str | The name of the parent column. |
| promote_orphans optional | bool | Whether to promote node tables whose parents do not exist to be children of the root node. The default is |
Returns
A tree table.
Examples
The following example creates a tree table from a static table.
The following example creates a tree table from a real-time table.

The following example creates a tree table from a source table that contains orphans. The first omits orphan nodes, while the second promotes them such that they appear in the tree table.