Skip to main content
This page provides a description of how to load a new CSV file into a new datastore in Atoti CVA Risk Capital. It walks through every layer of the data load pipeline introduced after the migration to the DLC framework: a new store, a new publisher target, a new topic, and registration for either initial-load or on-demand loading. The techniques employed are generic examples that can be extended, adapted, and repeated for any use case.

Step 1 - move the data files

Place the new CSV files under an appropriate folder in cvarc-application-tests/src/test/resources/data-samples/data/{AsOfDate}/. This example uses two files placed under the 2018-12-05 folder. 123_Custom_1.csv 987_Custom_2.csv
UselessData will be ignored — the topic’s parser column list (Step 3) determines which columns are read.

Step 2 - define the store and a reference

Add the new store and any references to existing stores in the addModifications() method of DatastoreCustomisationsConfig at cvarc-application/src/main/java/com/activeviam/cvarc/application/cfg/DatastoreCustomisationsConfig.java. This class lives in your project’s cvarc-application module and is intended to be edited directly.

Step 3 - define a publisher target, a source, and a topic

Create a new @Configuration class in cvarc-application/src/main/java/com/activeviam/cvarc/application/cfg/extensions/. It declares three DLC beans:
  • a TargetDescription — the publisher that writes parsed rows into the new store;
  • a LocalCsvSourceDescription — the source that scans CSV files under a directory;
  • a CsvTopicDescription — the topic that ties a file pattern to a parser and to the publisher target.
Mirror SASourceDescription (cvarc-starter/src/main/java/com/activeviam/cvarc/starter/cfg/impl/dlc/SASourceDescription.java) and TargetDescriptionsConfig (in the same package) for the canonical patterns.
The parser’s columns(...) list determines which columns are read. Columns present in the file but absent from the list (e.g. UselessData) are skipped.

Step 4 - wire the extension into ApplicationConfig

Add CustomFileSourceDescription to the @Import list of ApplicationConfig in cvarc-application/src/main/java/com/activeviam/cvarc/application/cfg/ApplicationConfig.java.

Step 5 - register the topic for loading

A topic that has been declared but never registered for loading does nothing. There are two common ways to register it:

Path A - initial-load via alias

AliasesDescriptionConfig (cvarc-starter/src/main/java/com/activeviam/cvarc/starter/cfg/impl/dlc/AliasesDescriptionConfig.java) groups topics under named aliases that InitialDataLoadConfig then loads at startup. Subclass it to append your new topic to an existing alias (or define a new one):
super.aliasesDescription().toBuilder() inherits every alias the parent declares; the additional .alias(...) call merges in the new topic. Add ExtendedAliasesDescriptionConfig to the @Import list of ApplicationConfig.

Path B - on-demand via data load controller

For loads triggered by an event or REST call rather than at startup, declare an ApplicationRunner @Bean that calls the IDataLoadControllerService. Mirror InitialDataLoadConfig.initialDataLoad() (cvarc-starter/src/main/java/com/activeviam/cvarc/starter/cfg/impl/dlc/InitialDataLoadConfig.java):
The same dlc.execute(...) call can be invoked from any Spring component (e.g. a REST controller) to load data on demand.

Step 6 - expose the new fields

To expose the new store’s fields as hierarchies or measures, see Adding a Hierarchy and Adding New Cube Measures. Each cube’s selection must be extended to include a reference into the new store before the fields become reachable.