Documentation Index
Fetch the complete documentation index at: https://private-7c7dfe99-page-updates.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Hierarchical dictionaries
ClickHouse supports hierarchical dictionaries with a numeric key. Look at the following hierarchical structure:| region_id | parent_region | region_name |
|---|---|---|
| 1 | 0 | Russia |
| 2 | 1 | Moscow |
| 3 | 2 | Center |
| 4 | 0 | Great Britain |
| 5 | 4 | London |
parent_region that contains the key of the nearest parent for the element.
ClickHouse supports the hierarchical property for external dictionary attributes. This property allows you to configure the hierarchical dictionary similar to described above.
The dictGetHierarchy function allows you to get the parent chain of an element.
For our example, the structure of the dictionary can be the following:
- DDL
- Configuration file