Opinum Standard Data File
One way to upload data on Opinum Data Hub, is to create a CSV File containing your data and upload it on your storage page or through the Opinum FTP server.
With the correct trigger configured, the system will process your file and send your data on the related Source you have created in Opinumb.
In this section, we are going to describe how to create such a file. An overview of Opinum data structure is also presented to clarify the way the StandardDataFile.csv works.
Download the template file: Standard Data File
Opinum data structure
Data in Opinum are stored as timeseries in a database. A data point is defined by three parameters:
- Datetime: ISO 8601
- Value: Float
- VariableId : Int
VariableId is an internal ID referring to a variable. A variable represents a type of measurement from a specific meter called “Source” in the Opinum structure.
Variables are defined by a name, technical parameters such as data ingestion frequency and data aggregation type and a MappingConfig field, used to link the data to the right variable. Each Variable is linked to one Source.
Sources represent the meters and are defined by an internal Id (SourceId), a name, an energy type and sets of technical parameters used to identify a meter such as SerialNumber, MeterNumber, EanNumber or SourceName. The choice of values for these parameters may differ from one case to another but it is critical that at least one of these parameters should uniquely apply to a specific meter, for data mapping purposes. This is explained in the next section.
The data mapping in Opinum works following these steps:
- Identify the source
The unique meter is found in your Opinum account by querying on one of these parameters:
- SourceId [automatically generated by Opinum at the creation of the source – can’t be edited]
Where to find these parameters? Go on the Sources Page, click on the name of the source for which you want to display these parameters. A pop-up window opens and displays the general information of your source:
In case of two or more parameters are set in the upload file, they must all match to find the source. If several sources match the parameters, the process stops there.
2.Identify the variable
The system inspects the variable linked to the previously found meter and selects the one with the specified MappingConfig parameter.
Where to find the variableId and the MappingConfig? Go on the Sources Page, click on the name of the source for which you want to display the variables. A pop-up window opens and display the general information of your source. Click on the tab ‘Variables’.
For each variable, you can click on the icon ‘settings’ which allows you to see the variable Id [automatically generated by Opinum at the creation of the variable – can’t be edited] and enter a MappingConfig.
Standard Data File
The file name must start with « Opisense StandardDataFile ». The file is identified as being a standard upload file by finding this key string in the file name. It can be followed by specific information such as date or client reference.
The StandardDataFile.csv must contain the following information:
At least one Source identification parameter:
Note that the VariableId can be used in replacement of 1. and 2, in which case the variable is automatically identified from this unique technical identifier.
The StandardDataFile.csv must respect the following requirements.
CSV coma separated.
Headers must be specified respecting the following syntax:
Every header must be entered between double quotes (“) The column order is not important. Only the columns corresponding with used parameters are mandatory.
Each line of the file corresponds to one variable, one timestamp and one value. Values linked to different variables or timestamps can be filled in the same file, on different lines.
|date||ISO 8601 (yyyy-mm-ddTHH:mm:ssZ)|
|value||Decimal (separator: period)|
Every value must be entered between double quotes (“)
One electricity meter with two measurements:
- Day Index
- Night Index
- Source EanNumber: 54141234567891011
- Two Variables with MappingConfig:
Opinum StandardDataFile content
Create the Standard Data File in Excel
In case you use Excel to create your Standard Data File, we highly suggest you to read this section where you will find some tips and advices : Standard Data File with Excel
Send data to Opinum
Once your own Opisense Standard Data file is ready, you can upload it in the Storage or automatically send it to Opinum FTP.
In both cases, you need first to define a trigger.
Learn more about Trigger.