Load
Data Hub provides several methods for loading data. The primary and recommended method is through the Spring Integration Channel, but there is also a service for loading source data in CSV format.
What Happens to Data as It Loads
Data is loaded into Data Hub as key-value pairs. With CSV data, which is already a key-value mapping, it is straightforward. With other data input formats, some processing occurs to extract the key-value pairs.
Each new batch, file, or stream is considered a new data loading action. Process all data in the provided batch, file, or stream, before the data loading action completes. As each key-value pair is loaded, it is recognized as a valid raw fragment and assigned a PENDING status. Only raw items with the PENDING status, and a completed data loading action, are eligible for composition.
CSV Web Service Extension
The goal of the CSV Web Service extension is to simplify the load process of raw items into the Data Hub. It is possible to make REST calls to the CSV web service to load the data. The REST call resource contains the name of the raw item where you want to load data. The request body contains the attribute names and data that you want to load.
CSV Header
itemnum,name,description,unittypeThe order of the attributes must match the order of the data.
CSV Body
The following rows in the CSV body include the data you are loading. Each row corresponds to exactly one raw item. Following the previous example, if you have the raw attributes: identifier, name, description, and unit, and you want to load three raw items, the corresponding CSV body includes the header plus the values for each attribute:
itemnum,name,description,unittype 0,pants,wear it to cover your legs,pieces 1,shorts,kinda like pants but shorter,pieces 2,t-shirt,wear it to cover your torso,pieces
In this example, you create three raw items. Each value in a column corresponds to the value of the attribute in the same column. So, for item 0, the value for identifier is 0, the value for name is pants, and so on.
itemnum,name,description,unittype 0,pants,,pieces 1,shorts,kinda like pants but shorter,pieces