Using DEE Template Orders

This section provides an overview of the DEE template orders included in the Accelerator.

DEE Template Orders

DEE Template orders are one way of interacting with the DEE. For more information about the DEE, see Data Extraction Engine.

Included template orders

The Accelerator provides template orders for:

  • The extraction of trade-level data for loading into appropriate summary cubes
  • The extraction of data for any specific usage

Extraction orders are located in the directory mr-application/src/main/resources/dee-templates

Extraction order JSON file Template Order Name Details
aggregate_risk_template DEE Get Aggregates Query Test Dummy sample template for GAQ extraction
cube_risk_template DEE MDX Query Test Dummy sample template for MDX extraction
PnLAggregatedCubeExport PLAggCubeExport Export to feed PL Summary Cube aggregated
PnlCubeExport PLCubeExport Export to feed PL Summary Cube
SensiAggregatedCubeExport SensiAggCubeExport Export to feed the Sensitivity Summary Cube aggregated
SensiCubeExport SensiCubeExport Export to feed the Sensitivity Summary Cube
SensiCubeMetricExport SensiCubeMetricExport Sample of export of metric from Sensitivity Cube
SensiScalarAggregatedCubeExport SensiScalarAggCubeExport Export to feed the Sensitivity Summary Cube aggregated scalar
SensiScalarCubeExport SensiScalarCubeExport Export to feed the Sensitivity Summary Cube scalar
store_risk_template DEE Search Facts Query Test Dummy sample template for store extraction
VaRESAggregatedCubeExport VaRESAggCubeExport Export for VaR-ES Summary Cube aggregated
VaRESCubeExport VaRESCubeExport Export for VaR-ES Summary Cube
VaRESCubeMetricExport VaRESCubeMetricExport Sample of export of metric from VaR-ES cube

Executing Template Orders

To execute template orders, we use the submitTemplateOrders POST REST endpoint.

Examples

URL

http://localhost:10010/mr-application/connectors/rest/dee/v1/submitTemplateOrders

Body - Summary Cube Extraction

The following example can be used by changing the templateOrderName to the relevant template order name.

{
  "templateOrderName": "PLCubeExport"
}

Diving into the template

Template orders describe the name of the template order, the query being executed, and the format of the output file.

Query

Within the query object we state the levels (locations), measures (measureSelections), and the cube (pivotId). Additionally, we describe the context values.

Output

Within the output object we state the directory and name of the output file. Lastly, we describe where each column will get its data.

The output file’s columns map to one of the following types:

  • Level (levelOutputColumn)

  • Measure (measureOutputColumn)

  • Static value (echoOutputColumn)

  • Value which requires some logic (extractProcValueOutputColumn)

    note

    These values are currently tied to measures which are often used as placeholders and may not appear in your query

Template Placeholders

We can use placeholders (templatePlaceholders) when we want to modify our template order each time before executing it. We can also use the same placeholder within our filename to distinguish between unique template orders.

Extraction Procedures

Not all columns come directly from the value of a measure or level, so in these cases we need to use an extraction procedure. For our summary cube template orders we use GAQVectorValuesExtractionProcedure to format vector output columns to what is expected by the ETL of summary cubes.