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

# Input file formats

> Reference for the common CSV file formats (trade attributes, FX rates, counterparties, organizations, and books) with columns, types, and target tables.

Atoti Enterprise Risk Suite solutions load data from CSV files. Each file pattern maps to a target datastore table through a topic-to-channel mapping declared by the solution's data-load configurer. File patterns use the glob syntax supported by the data-loading API.

A file loads into a topic when it is named `<Name>.csv` or `<Name>_<suffix>.csv`. The suffix requires a leading underscore, and the match is case-sensitive. It applies at any folder depth under the base path. See [How must CSV files be named?](../developer-guide/data-loading#how-must-csv-files-be-named) for the full rule.

This page documents the common file formats shared across solutions. Solution-specific file formats are documented in the corresponding solution reference.

**Prerequisites:** Data loading must be configured for file-based loading to activate. Optional files (Counterparties, Organizations and Books) are only loaded when the corresponding feature is enabled.

## Trade attributes

| Property | Value |
| - | - |
| File pattern | `glob:{,**/}TradeAttributes{,_*}.csv` |
| Target table | `TradeAttributes` |

This file provides descriptive attributes for each trade. It is joined to the trade fact table on `AsOfDate` and `TradeId`.

| Column | Type | Description |
| - | - | - |
| AsOfDate | `LocalDate (ISO format)` | Risk calculation date |
| TradeId | `String` | Unique trade identifier (key) |
| Trader | `String` | Name of the trader responsible for the trade |
| Sales | `String` | Name of the sales person associated with the trade |
| TradeDate | `LocalDate (ISO format)` | Date the trade was booked |
| TradeMaturityDate | `LocalDate (ISO format)` | Maturity date of the trade |
| CounterpartyId | `String` | Identifier of the counterparty (foreign key to Counterparties) |
| OrganizationUnitId | `String` | Organizational unit identifier (foreign key to Organizations) |
| BookId | `String` | Optional. Book identifier (foreign key to Books). The file can omit the column. |

Example row:

```
AsOfDate,TradeId,Trader,Sales,TradeDate,TradeMaturityDate,CounterpartyId,OrganizationUnitId
2023-09-26,BOND_BHP Billiton 3a206ac0,John,Mathew,2023-04-19,2036-02-13,43,ActiveBank Singapore
```

## FX rate market data

| Property | Value |
| - | - |
| File pattern | `glob:{,**/}FXRateMarketData{,_*}.csv` |
| Target table | `FxRateMarketData` |

This file provides exchange rates used to convert P\&L values into the selected display currency.

| Column | Type | Description |
| - | - | - |
| AsOfDate | `LocalDate (ISO format)` | Date of the exchange rate |
| MarketDataSet | `String` | Market data set identifier (e.g. "Official EOD") |
| BaseCcy | `String` | Base currency of the rate |
| CounterCcy | `String` | Counter currency of the rate |
| Quote | `Double` | Exchange rate: units of CounterCcy per unit of BaseCcy |

Example row:

```
AsOfDate,MarketDataSet,BaseCcy,CounterCcy,Quote
2023-09-26,Official EOD,EUR,USD,1.0574
```

## Counterparties (optional)

| Property | Value |
| - | - |
| File pattern | `glob:{,**/}Counterparties{,_*}.csv` |
| Target table | `CounterpartyAttributes` |
| Requires feature | `atoti.solution.model.cubes.<cube-name>.counterparties.enabled=true` |

This file provides descriptive and classification attributes for counterparties. It is only loaded when the counterparties feature is enabled.

| Column | Type | Description |
| - | - | - |
| AsOfDate | `LocalDate (ISO format)` | Reference date |
| CounterpartyId | `String` | Unique counterparty identifier (key) |
| CounterpartyParentId | `String` | Parent counterparty identifier for hierarchy |
| CounterpartyName | `String` | Display name of the counterparty |
| Rating | `String` | Credit rating (e.g. AAA, A, B) |
| Sector | `String` | Industry sector classification |
| CountryOfAddress | `String` | Country of registered address (ISO 3166-1 alpha-3) |
| CountryOfRisk | `String` | Country of primary risk exposure (ISO 3166-1 alpha-3) |

Example row:

```
AsOfDate,CounterpartyId,CounterpartyParentId,CounterpartyName,Rating,Sector,CountryOfAddress,CountryOfRisk
2023-09-26,1,142,Unilever ord,AAA,Consumer Staples,GBR,GBR
```

## Organizations (optional)

| Property | Value |
| - | - |
| File pattern | `glob:{,**/}Organizations{,_*}.csv` |
| Target table | `OrganizationAttributes` |
| Requires feature | `atoti.solution.model.cubes.<cube-name>.organization.enabled=true` |

This file defines the organizational hierarchy used for aggregating trades by reporting unit. It is only loaded when the organization feature is enabled. The hierarchy is built from parent-child relationships.

| Column | Type | Description |
| - | - | - |
| AsOfDate | `LocalDate (ISO format)` | Reference date |
| OrganizationUnitId | `String` | Identifier of the organizational unit (leaf or node) |
| OrganizationParentUnitId | `String` | Identifier of the parent unit; empty for the root node |

Example rows:

```
AsOfDate,OrganizationUnitId,OrganizationParentUnitId
2023-09-26,ActiveBank Group,
2023-09-26,ActiveBank International,ActiveBank Group
2023-09-26,ActiveBank EMEA,ActiveBank International
```

## Books (optional)

| Property | Value |
| - | - |
| File pattern | `glob:{,**/}Books{,_*}.csv` |
| Target table | `BookAttributes` |
| Requires feature | `atoti.solution.model.cubes.<cube-name>.books.enabled=true` |

This file defines the book hierarchy used for aggregating trades by book. It is only loaded when the book feature is enabled. The hierarchy is built from parent-child relationships.

| Column | Type | Description |
| - | - | - |
| AsOfDate | `LocalDate (ISO format)` | Reference date |
| BookId | `String` | Identifier of the book (leaf or node) |
| BookParentId | `String` | Identifier of the parent book; empty for a root book |

Example rows:

```
AsOfDate,BookId,BookParentId
2023-09-26,ActiveBank Books,
2023-09-26,Markets,ActiveBank Books
2023-09-26,Rates,Markets
```

## Related pages

* [Configuration properties](./configuration-properties)
* [Dimensions and hierarchies](./dimensions-and-hierarchies)
