Description
Returns hierarchy tree values for org-structure filtering (Rippling-specific).
Syntax
GET_TREE(tree_type, root_id, field, [include_terminated])
Parameters
| Parameter | Description | Data Type | Required |
|---|---|---|---|
| tree_type | Hierarchy type to expand (e.g. Department, Manager, Team) | String | Yes |
| root_id | Root node ID to expand from | String | Yes |
| field | Field to return from each node (e.g. id, name) | String | Yes |
| include_terminated | Optional flag such as include_terminated to include terminated roles | String | No |
Notes
- Org/hierarchy semantics. Common pattern: col IN (GET_TREE(...)).
Example
SELECT
GET_TREE(org_path, 'department', 'id', 1)
FROM
rippling.employee.Employee
LIMIT
5;