TC9.3 - Managing data sets with IOT Applications, and exploiting DataGate

×

Warning message

You can't delete this newsletter because it has not been sent to all its subscribers.

Test Case Title

TC9.3 - Managing data sets with IOT Applications, and exploiting DataGate

Goal

I can

  • Add resources on a created Dataset
  • Fill the created resources with data

Prerequisites

Using a PC or Mobile with a web browser.

The following functionalities are available only for specific Snap4city users with specific privileges.

Expected successful result

Data collected and available in DataGate/CKAN

Steps

 

 

Users roles for which this test case is available: Area Manager, ToolAdmin, RootAdmin

Users roles for which the test case is not available: Manager

  1. Connect to DataGate and select a dataset where the resources must be created.

  1. Create your own dataset, in this example the dataset “IoTApplicationBundleDataset” is used

  1. Followthe above steps to retrieve the Dataset Id, useful to configure the node on IOT Application

  1. Clicking on explore the link of the resource is shown and from this we can get the id of the dataset which is the alphanumeric string that follows the string "dataset/" in the url of the resource

  1. In this case d7a2d38a-4c42-41d5-91fe-ad8dfd04ab88

 

  1. Open a Flow in your cloud (TC2.1a) or local (TC2.1b) IotApplication
  2. If you want the complete flow (without the authentication node): Import for the flow  "TC9.3 - Managing data sets with IOT Applications, and exploiting DataGate" with the steps described in TC2.13 (on cloud) or import it from a file (if you have not an IOT Application on cloud) and configure the nodes to work with yuor dataset.
  3. Drag and drop the “Datagate Create” from “S4C Big Data” menu:

  1. And fill the configuration tab like this with your credentials:

  1. Press Done and Deploy the node. Clicking on the left button of the node the resource is created in the previously selected dataset and in the debug tab is showed the id of the resource “b95d335c-a256-4998-8ca7-b1a111ab474d” :

  1. Going to DataGate menu and select the previous dataset it is possible to see the new resource:

  1. To add data to the resource use a Rest API provided by the municipality of Florence that returns the data of free parking spaces monitored. The flow that retrieves the data, transforms it into JSON, splits each element of the array, and selects only the Careggi element is as follows:

  1. After the switch node you have to add a "Datagate Insert" node that takes the JSON out of the swich and loads it directly onto the datagate, after the node switch you must add a node "Datagate Insert" that takes the JSON out of the swich and loads it directly to the datagate, inserting in configuration only the id of the resource to be filled

 

  1. Clicking on the button on “Inject Node” labelled “Timestamp” the data are inserted and a msg with success is showed

  1. Going to DataGate it is possible to see the inserted data