> ## 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](https://docs.activeviam.com/solutions/frtb/6.0/database/tranche.md) table. To define Overrides you must add facts to the base table. For details on why this is required, see [Overrides With DirectQuery](https://docs.activeviam.com/solutions/frtb/6.0/dev/dev-direct-query/customization-and-internals/overrides-with-directquery.md).

### Inject Base Table

For each override, you must generate multiple entries in the [Tranche](https://docs.activeviam.com/solutions/frtb/6.0/database/tranche.md) table with the following
structure.

| Override Parameter | **Tranche** Table Field |
| - | - |
| **OVERRIDE KEY FIELD** | **TRANCHE** |
| **OVERRIDE DATE FIELD** | **AS\_OF\_DATE** |

Where:

* **Override Parameter**: The parameters to determine where to apply this override.
* **Tranche Table Field**: The field in the [Tranche](https://docs.activeviam.com/solutions/frtb/6.0/database/tranche.md) base table for this override.

### Create Base Store Tuples

See the [Create Override Tuples](https://docs.activeviam.com/solutions/frtb/6.0/dev/dev-direct-query/customization-and-internals/overrides-with-directquery.md#create-the-override-tuples) section for
an example of how to create the override tuples for the following override fields. These are the fields we want to override in the base override table, in
this case the [Tranche](https://docs.activeviam.com/solutions/frtb/6.0/database/tranche.md) Table.

| Override Table |
| - |
| PARAMETER\_SET |
| BUCKET |
| SENIORITY |
| RATING |
| TYPE |
| REGION |
| ASSET\_CLASS |
| ATTACHMENT |
| DETACHMENT |
| RISK\_WEIGHT |

These fields form an intermediate table containing the Override's base store fields and will be merged back into the Override base table: [Tranche](https://docs.activeviam.com/solutions/frtb/6.0/database/tranche.md).

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