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

The COUNTERPARTY\_PARENT\_CHILD table contains the parent/child relationships used to build the counterparty hierarchy.

> [!NOTE]
>
> The [COUNTERPARTY\_HIERARCHY](https://docs.activeviam.com/solutions/market-risk/6.0/database/counterparty_hierarchy.md) table is populated from the COUNTERPARTY\_PARENT\_CHILD 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. |
| CHILD | STRING | Y | | | Identifier of the node in the Counterparty hierarchy. |
| PARENT | STRING | | | | Identifier of the parent node (or null if there is no parent). |

## Unique Key

| Columns |
| - |
| AS\_OF\_DATE |
| CHILD |

## Joins

There is a self-join on the COUNTERPARTY\_PARENT\_CHILD table - see [database creation script](../dev/dev-direct-query/configuration-getting-started#reference-database) for details.

***

[^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.
