> ## 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.

# COUNTERPARTY_HIERARCHY

The COUNTERPARTY\_HIERARCHY table contains the multi-level counterparty organizational structure.

<Note>
  **Note**: The content of this table is populated from the content of the [COUNTERPARTY\_PARENT\_CHILD](./counterparty_parent_child) table.
</Note>

| Column Name                      | Type   | Not Null | Cube Field                                           | Default Value[1](#fn:1) | Description                                                                                      |
| -------------------------------- | ------ | -------- | ---------------------------------------------------- | ----------------------- | ------------------------------------------------------------------------------------------------ |
| AS\_OF\_DATE                     | DATE   | Y        |                                                      |                         | Timestamp (at close of business) for the data.                                                   |
| COUNTERPARTY\_ID                 | STRING | Y        | [CounterpartyIds](../cube/dimensions/counterparties) | N/A                     | Leaf node of the book hierarchy. This matches the last non-\_DATAMEMBER\_ node in levels 1 - 15. |
| COUNTERPARTY\_HIERARCHY\_LEVEL1  | STRING | Y        | Level 1                                              | N/A                     | Node at level 1 of the counterparty hierarchy.                                                   |
| COUNTERPARTY\_HIERARCHY\_LEVEL2  | STRING | Y        | Level 2                                              | N/A                     | Node at level 2 of the counterparty hierarchy.                                                   |
| COUNTERPARTY\_HIERARCHY\_LEVEL3  | STRING | Y        | Level 3                                              | N/A                     | Node at level 3 of the counterparty hierarchy.                                                   |
| COUNTERPARTY\_HIERARCHY\_LEVEL4  | STRING | Y        | Level 4                                              | N/A                     | Node at level 4 of the counterparty hierarchy.                                                   |
| COUNTERPARTY\_HIERARCHY\_LEVEL5  | STRING | Y        | Level 5                                              | N/A                     | Node at level 5 of the counterparty hierarchy.                                                   |
| COUNTERPARTY\_HIERARCHY\_LEVEL6  | STRING | Y        | Level 6                                              | N/A                     | Node at level 6 of the counterparty hierarchy.                                                   |
| COUNTERPARTY\_HIERARCHY\_LEVEL7  | STRING | Y        | Level 7                                              | N/A                     | Node at level 7 of the counterparty hierarchy.                                                   |
| COUNTERPARTY\_HIERARCHY\_LEVEL8  | STRING | Y        | Level 8                                              | N/A                     | Node at level 8 of the counterparty hierarchy.                                                   |
| COUNTERPARTY\_HIERARCHY\_LEVEL9  | STRING | Y        | Level 9                                              | N/A                     | Node at level 9 of the counterparty hierarchy.                                                   |
| COUNTERPARTY\_HIERARCHY\_LEVEL10 | STRING | Y        | Level 10                                             | N/A                     | Node at level 10 of the counterparty hierarchy.                                                  |

## Unique Key

<table><thead><tr><th>Columns</th></tr></thead><tbody><tr><td>AS\_OF\_DATE</td></tr><tr><td>COUNTERPARTY\_ID</td></tr></tbody></table>

## Incoming Joins

<table><thead><tr><th>Source Table</th><th>Source Columns</th><th>Target Columns</th></tr></thead><tbody><tr><td><a href="./trade_attributes">TRADE\_ATTRIBUTES</a></td><td>AS\_OF\_DATE<br />COUNTERPARTY\_ID</td><td>AS\_OF\_DATE<br />COUNTERPARTY\_ID</td></tr></tbody></table>

***

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.
    [↩︎](#fnref:1)
