DLC Requests

Overview

You can load and unload data in ActivePivot by invoking the DLC.

Loading Data can be done from a variety of sources like CSV Fetch or messaging sources.

It is also possible to unload data if your data changes throughout the day.

Your calls to load data will also generate responses which will inform you if the load has succeeded or not.

DLC Request

A DLC request consists of three main components: Operation, Topic(s), and Scope.

Below is an example of submitting a Load Operation for Topics “Topic_1” and “Topic_2” Scoped on the date 01/01/2020.

// Get our DataLoadController object
DataLoadController myDataLoadController = configureDlc();

// Configure DLC Request Object
Map<String, Object> scope = new HashMap<>();
scope.put("CobDate", "01/01/2020");
DataLoadControllerRequest request = new DataLoadControllerRequest(
        "LOAD",
        Arrays.asList(["Topic_1", "Topic_2"]),
        scope);

DataLoadControllerResponse response = myDataLoadController.execute(request);

POST Request sent to:

 http://<hostname>:<port>/<app-context>/services/connectors/rest/dlc/<rest-version>/execute

With JSON body:

{
  "operation": "LOAD",
  "topics": ["Topic_1", "Topic_1"],
  "scope": {
    "CobDate": "01/01/2020"
  }
}

Operations

Operations define whether to load, unload, start, or stop listening on a datasource.

Topics

Topics define what data to Load, and since Topics are globally unique, the Topic will only belong to one data source. So a Topic represents not only what to load, but where to load from. A DLC Request can consist of many topics, all coming from different data sources. All Topics will be loaded in a single Datastore Transaction. If one Topic fails, then the entire Datastore Transaction will be rolled back and a Failure message will be returned.

search.js