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

# TRANCHE_OVERRIDES

The TRANCHE\_OVERRIDES table contains the Override definitions for the Tranches.

| Column Name    | Type   | Not Null |
| -------------- | ------ | -------- |
| TRANCHE        | STRING | Y        |
| RISK\_CLASS    | STRING | Y        |
| PARAMETER\_SET | STRING | Y        |
| BUCKET         | STRING |          |
| SENIORITY      | STRING |          |
| RATING         | STRING |          |
| TYPE           | STRING |          |
| REGION         | STRING |          |
| ASSET\_CLASS   | STRING |          |
| ATTACHMENT     | DOUBLE |          |
| DETACHMENT     | DOUBLE |          |
| RISK\_WEIGHT   | DOUBLE |          |
| AS\_OF\_DATE   | DATE   | Y        |

## Unique Key

| Columns        |
| -------------- |
| TRANCHE        |
| RISK\_CLASS    |
| PARAMETER\_SET |
| AS\_OF\_DATE   |

## Override Base Table

The base table for these overrides is the [Tranche](./tranche) table. To define Overrides you must add facts to the base table. For details on why this is required, see [Overrides With DirectQuery](../dev/dev-direct-query/customization-and-internals/overrides-with-directquery).

### Inject Base Table

For each override, you must generate multiple entries in the [Tranche](./tranche) table with the following
structure.

| Override Table      |
| ------------------- |
| PARAMETER\_SET      |
| BUCKET              |
| CSRQUALITY          |
| CSRSECTOR           |
| CSRRATING           |
| EQUITY\_MARKET\_CAP |
| EQUITY\_ECONOMY     |
| EQUITY\_SECTOR      |
| POOL                |
| ATTACHMENT          |
| DETACHMENT          |

These fields form an intermediate table containing the Override's base store fields and will be merged back into the  Override base table: [Tranche](./tranche).

#### Map Override Fields to Base Table Fields

Once you create your tuples for each override field, you can then map the tuples back to the base store using the following relationship:

| Override Table      | Tranche Field | Note              |
| ------------------- | ------------- | ----------------- |
| OVERRIDE KEY FIELD  | TRANCHE       |                   |
| OVERRIDE DATE FIELD | AS\_OF\_DATE  |                   |
| PARAMETER\_SET      |               | No mapping exists |
| BUCKET              | BUCKET        |                   |
| SENIORITY           | SENIORITY     |                   |
| RATING              | RATING        |                   |
| TYPE                | TYPE          |                   |
| REGION              | REGION        |                   |
| ASSET\_CLASS        | ASSET\_CLASS  |                   |
| ATTACHMENT          | ATTACHMENT    |                   |
| DETACHMENT          | DETACHMENT    |                   |
| RISK\_WEIGHT        | RISK\_WEIGHT  |                   |
|                     | RISK\_CLASS   | No mapping exists |
