Skip to content

Data Service (DAT)

DAT Overview

The Data Service allows a User Program to make, save, and load DataProject objects. The DataProject model can be used to create a folder structure of tables that can be accessed by path semantics in the same manner as a file system. This is illustrated in Figure 3.

Optimizer Project DataService Diagram

Image 1

The benefits of the DataService are:

  • A DataProject can be serialized and sent to another node for processing where it can be deserialized and processed. The process can add its own data and pass it on to another node, or return it to the original sender.
  • The DataProject is able to be serialized into JSON form and is used to encode and decode data in the Web Services Interface.
  • External data sources can be added to the DataService to provide access to table based data in User projects.
  • CSV Files can be accessed and loaded by the User program into the DataService.

DAT Operation

User Programs will normally use the DataService for accessing local and external data sources. External Data Sources are secured and identified by Data Project Codes. An example of data codes are shown in Table 5.

Sample Data Codes and Information Table

Code Arguments Source DataProject Contents
nis-dat-001 None Northfield Sample Data Sample “benchmark” and “portfolio” data from the NISASP server.
nis-dat-218 OFX Portfolio ID Open Finance Asset list and asset information from an OFX positions report.

A full list of data codes and the data they provide is available on request. Access to data codes also needs to be granted and associated with your ccs.auth code provided to you by Northfield.

The Data API is best understood by reviewing the SDK demo files and the JavaDoc.

DAT Configuration

The DataService can be configured to read local CSV files. You can set the following properties in the ccs.properties file:

  • csv.file.path: absolute path to root directory
  • csv.root.name: name

This instructs the DataService to read the csv.file.path directory and all sub directories as DataFolder objects with the directory name as the folder name, and all CSV files as DataTable objects with the table name being the file name. The path root name is set by default to “local”, but can be any string value.