> ## Documentation Index
> Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt
> Use this file to discover all available pages before exploring further.

# LEGAL_ENTITY_HIERARCHY

The LEGAL\_ENTITY\_HIERARCHY table contains the multi-level legal entity organizational structure.

> [!NOTE]
>
> The content of this table is populated from the content of the [LEGAL\_ENTITY\_PARENT\_CHILD](https://docs.activeviam.com/solutions/market-risk/6.0/database/legal_entity_parent_child.md) table.

| Column Name | Type | Not Null | Cube Field | Default Value[^1] | Description |
| - | - | - | - | - | - |
| AS\_OF\_DATE | DATE | Y | | | Timestamp (at close of business) for the data. |
| LEGAL\_ENTITY | STRING | Y | [Legal Entities](https://docs.activeviam.com/solutions/market-risk/6.0/cube/dimensions/organization.md) | N/A | Leaf node of the book hierarchy. This matches the last non-\_DATAMEMBER\_ node in levels 1 - 15. |
| LEGAL\_ENTITY\_HIERARCHY\_LEVEL1 | STRING | Y | Level 1 | N/A | Node at level 1 of the legal entity hierarchy. |
| LEGAL\_ENTITY\_HIERARCHY\_LEVEL2 | STRING | Y | Level 2 | N/A | Node at level 2 of the legal entity hierarchy. |
| LEGAL\_ENTITY\_HIERARCHY\_LEVEL3 | STRING | Y | Level 3 | N/A | Node at level 3 of the legal entity hierarchy. |
| LEGAL\_ENTITY\_HIERARCHY\_LEVEL4 | STRING | Y | Level 4 | N/A | Node at level 4 of the legal entity hierarchy. |
| LEGAL\_ENTITY\_HIERARCHY\_LEVEL5 | STRING | Y | Level 5 | N/A | Node at level 5 of the legal entity hierarchy. |

## Unique Key

| Columns |
| - |
| AS\_OF\_DATE |
| LEGAL\_ENTITY |

## Incoming Joins

| Source Table | Source Columns | Target Columns |
| - | - | - |
| [TRADE\_ATTRIBUTES](https://docs.activeviam.com/solutions/market-risk/6.0/database/trade_attributes.md) | AS\_OF\_DATE LEGAL\_ENTITY | AS\_OF\_DATE LEGAL\_ENTITY |

[^1]: If the default value is marked as empty, it means that the default value is 'null' for nullable fields, and that a value needs to be explicitly set for non-nullable fields.
