> ## 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](./counterparty_hierarchy) table is populated from the 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.                 |
| 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

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

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