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

# COUNTERPARTIES

The COUNTERPARTIES table contains data for counterparties.

| Column Name | Type | Not Null | Default Value[^1] | Cube Field | Description |
| - | - | - | - | - | - |
| AS\_OF\_DATE | DATE | Y | | | Timestamp (at close of business) for the data. |
| COUNTERPARTY\_ID | STRING | Y | N/A | [CounterpartyIds](https://docs.activeviam.com/solutions/market-risk/6.0/cube/dimensions/counterparties.md) | Counterparty identifier. Used as a foreign key when counterparty is referenced. |
| COUNTERPARTY\_NAME | STRING | Y | N/A | [CounterpartyNames](https://docs.activeviam.com/solutions/market-risk/6.0/cube/dimensions/counterparties.md) | Full counterparty name. |
| RATING | STRING | Y | N/A | [CounterpartyRatings](https://docs.activeviam.com/solutions/market-risk/6.0/cube/dimensions/counterparties.md) | Rating of the counterparty. |
| SECTOR | STRING | Y | N/A | [CounterpartySectors](https://docs.activeviam.com/solutions/market-risk/6.0/cube/dimensions/counterparties.md) | Sector of the counterparty. |
| COUNTRY\_OF\_ADDRESS | STRING | Y | N/A | [CounterpartyCountriesOfAddress](https://docs.activeviam.com/solutions/market-risk/6.0/cube/dimensions/counterparties.md) | Country where the counterparty is located, in the form of a unique three-letter country identifier code. |
| COUNTRY\_OF\_RISK | STRING | Y | N/A | [CounterpartyCountriesOfRisk](https://docs.activeviam.com/solutions/market-risk/6.0/cube/dimensions/counterparties.md) | Country the risk of counterparty can be attributed to, in the form of a unique three-letter country identifier code. |

## Unique Key

| Columns |
| - |
| AS\_OF\_DATE |
| COUNTERPARTY\_ID |

## 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 COUNTERPARTY\_ID | AS\_OF\_DATE COUNTERPARTY\_ID |

## Outgoing Joins

| Target Table | Source Columns | Target Columns |
| - | - | - |
| [COUNTRIES](https://docs.activeviam.com/solutions/market-risk/6.0/database/countries.md) | AS\_OF\_DATE COUNTRY\_OF\_ADDRESS | AS\_OF\_DATE COUNTRY\_CODE |
| [COUNTRIES](https://docs.activeviam.com/solutions/market-risk/6.0/database/countries.md) | AS\_OF\_DATE COUNTRY\_OF\_RISK | AS\_OF\_DATE COUNTRY\_CODE |

***

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