How to send CSV data to a REST server

Overview

This Scenario describes step by step how an integration of equipment data to any kind of REST-server is done. The next steps guide you through the creation of Information Models, Channels, Mappings, Device Types, Instances and Deployments.

Scenario Overview

The CSV, which represents the equipment data, in this demo scenario contains four parameters that are all comma-delimited. Below you can find the sample data. Create a new CSV-file on your local machine and copy and paste the sample data.

"PARTNR","TIMESTAMP","TEMPERATUR","PRESSURE"
"4595","2020-05-01 07:00:43","62","222"
"4596","2019-05-01 07:01:43","62","223"
"4597","2019-05-01 07:02:43","63","223"
"4598","2019-05-01 07:03:43","61","225"
"4599","2019-05-01 07:04:43","66","228"
"4600","2019-05-01 07:05:43","64","223"
"4601","2019-05-01 07:06:43","66","223"
"4602","2019-05-01 07:07:43","62","222"
"4603","2019-05-01 07:08:43","62","228"

.. uml::



@startuml



participant Equipment #00AEEF

box "SMARTUnifier" #34F6C8

participant "Equipment Channel File Tailer (CSV)" as EquipmentChannel  #F1F1F1

participant Mapping #F1F1F1

participant "REST Server Channel" as RESTChannel #F1F1F1

end box

participant "REST Server" as REST #00AEEF



Equipment -> EquipmentChannel: Reads incoming lines in the CSV-file

EquipmentChannel -> EquipmentChannel : Observes new lines of the CSV-file and triggers associated event()

EquipmentChannel -> Mapping : Triggers rule: csv2rest()

Mapping -> Mapping : Executes Rule: CsvToRest()

Mapping -> RESTChannel: Sends data to the REST server

RESTChannel -> REST : Sends data to the REST server



@enduml