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

# Using DEE template orders

> Guide to using DEE template orders in Atoti FRTB to define and sequence data loading operations

This section provides an overview of the DEE template orders included in Atoti FRTB. For general information
see [DEE Template Orders](https://docs.activeviam.com/solutions/libraries/data-extraction-engine/user-guide/dee-template-orders.md)
.

### Included template orders

The Solution provides template orders for:

* CRIF-format extraction of StandardisedApproachCube data
* The extraction of trade-level data for loading as summary data (at book and legal-entity level)

The files produced by these extraction procedures can be loaded into the cube.

#### Available template orders

| Extraction order JSON file | Details |
| - | - |
| CrifExtraction | StandardisedApproachCube export in CRIF format. See [CRIF](https://docs.activeviam.com/solutions/frtb/6.0/input-files/crif.md) file format. |
| SACubeDeltaExport | StandardisedApproachCube Delta sensitivities export as summary data. See [SBM\_Delta\_Sensi\_Summary](https://docs.activeviam.com/solutions/frtb/6.0/input-files/delta-summary.md) file format. |
| SACubeVegaExport | StandardisedApproachCube Vega sensitivities export as summary data. See [SBM\_Vega\_Sensi\_Summary](https://docs.activeviam.com/solutions/frtb/6.0/input-files/vega-summary.md) file format |
| SACubeCurvatureExport | StandardisedApproachCube Curvature sensitivities export as summary data. See [SBM\_Curvature\_Sensi\_Summary](https://docs.activeviam.com/solutions/frtb/6.0/input-files/curvature-summary.md) file format. |
| SACubeDRCExport | StandardisedApproachCube DRC sensitivities export as summary data. See [DRC\_Summary](https://docs.activeviam.com/solutions/frtb/6.0/input-files/sa-drc-summary.md) file format. |
| SACubeRRAOExport | StandardisedApproachCube RRAO sensitivities export as summary data. See [RRAO\_Summary](https://docs.activeviam.com/solutions/frtb/6.0/input-files/rrao-summary.md) file format. |
| IMACubeExport | InternalModelApproachCube export as summary data. See [IMA\_Summary](https://docs.activeviam.com/solutions/frtb/6.0/input-files/ima-summary.md) file format. |
| IMADRCCubeExport | IMADRCCube export as summary data. See [IMA\_DRC\_Summary](https://docs.activeviam.com/solutions/frtb/6.0/input-files/drc-summary-ima.md) file format. |
| PLCubeExport | PLCube export as summary data. See [PLSummary](https://docs.activeviam.com/solutions/frtb/6.0/input-files/pl-summary.md) file format. |

## Custom extraction procedures

Within our template orders we make use of custom extraction procedures which can be found in the following directory:

`frtb-activepivot/src/main/java/com/activeviam/frtb/ref/services/dee/impl/`

| Template order | Procedure used |
| - | - |
| `IMACubeExport`, `IMADRCCubeExport`, and `PLCubeExport` | `FRTBVectorExtractionProcedure` to format vector output columns to what is expected by the ETL of summary data. |
| `CrifExtraction` | `FRTBCrifExtractionProcedure` for a majority of our output columns so that they appear in the correct format. |
| `SACubeDeltaExport` | `DeltaExtractionProcedure` to create the columns which use different levels based on RiskClass. |
| `SACubeDRCExport` | `DRCExtractionProcedure` to create the columns which use different levels based on RiskClass. |

## Template placeholders

All the template orders use the `AsOfDate` placeholder to describe the value of the AsOfDate level in the executed query as well as
within the file name.

### DEE properties

The template order location is set by the `data.extraction.templates.base.dir.path` property. The base directory of the output files is set by
the `data.extraction.service.base.dir.path` property.

> [!NOTE]
>
> Subdirectory and file names are set within the template orders themselves.

For more information,
see [DEE Properties](https://docs.activeviam.com/solutions/libraries/data-extraction-engine/configuration/properties.md)
.

### Example submit template order requests

#### URL

`http://localhost:8080/frtb-starter/connectors/rest/dee/v1/submitTemplateOrders`

#### Body - Summary Data Extractions

The following example can be used for IMACubeExport, IMADRCCubeExport, and PLCubeExport by changing the `templateOrderName` to the relevant template order name.

```json theme={"languages":{"custom":["/engine/python-sdk/6.2/languages/pycon.tmLanguage.json"]}}
{
  "templateOrderName": "PLCubeExport",
  "templatePlaceholders": {
    "AsOfDate": "2018-06-29"
  }
}
```

#### Body - CRIF Extraction

The following example can be used for CrifExtraction

```json theme={"languages":{"custom":["/engine/python-sdk/6.2/languages/pycon.tmLanguage.json"]}}
{
  "templateOrderName": "CrifExtraction",
  "templatePlaceholders": {
    "AsOfDate": "2018-06-29"
  }
}
```
