There are two types of Data Template that can be created. We can create a Data Template for a single thing and Gateway Data Template for multiple things.

You can add a data template by

  • Clicking Data Templates in the Manage dropdown (for the first time)
  • Clicking Add New Template on the top-right corner of the Data Template page (after you have added a data template)
  • Clicking Add Data Template from the Create () menu present on the title pane.

Adding a Data Template


  1. Select the Data Template Tile and Click on Create button.
  2. Enter a suitable Name for the data template. This field is mandatory.
  3. Add a suitable Description of the data template.
  4. Select the desired radio button.
    1. Enter Expression
      1. Enter the Property Name you want to add to the data template.
      2. Select the Data Type of the Property from the dropdown. The three available data types are Number, Boolean, and String. For example, a property like temperature will be of number data type.
      3. Enter a Description of the added Property.
      4. From the Action tile, Click the Save icon () to save the Property. Click on Add Row () to add the next Property. You can add as many properties as you want.



    2. CSV Upload

      Using CSV you can build multiple expressions.

      (info)
      Note

      You can upload CSV files with valid headers only. Click on Download Sample File to download the sample CSV file with the valid headers.

      1. Select the CSV upload radio button to upload the CSV file.

      2. Click on the Upload CSV button and select the CSV file.



  5. After you have added the required properties, click Create. The data template is created and added to the list on the Data Templates page.
  6. The Created data template appears in the format DT_Datatemplatename. Where DT represents the Data template. It helps to understand whether the data is coming from a single thing or multiple things.

The table below describes the various icons on the Create New Data Template page for performing various operations on the added properties.

Icon

Name

Click to

Edit Icon

Edit a property

Delete Icon

Delete a property

Add Icon

Add a New Row

Clear All Icon

Clear the Row


Adding a Gateway Data Template


To add a Gateway Data Template

  1. Select the tile and click on the Create button.
  2. Enter a suitable Name for the data template. This field is mandatory.
  3. Add an appropriate Description of the data template.
  4. From the JSON and CSV radio buttons, select the desired one.
    1. JSON Input
      1. Add your input JSON format and validate the JSON format. If the pasted JSON format is inappropriate, then a pop-up is shown. 
      2. After validating the JSON, click 'Create' to create the Gateway data template.



    2. CSV Upload

      (info)
      Note
      You can upload CSV files with valid headers only. Click on Download Sample File to download the sample CSV file with the valid headers.
      1. Click on the Upload CSV button and select the CSV file.

      2. Click 'Create' to generate the Gateway data template after uploading the CSV file.




  5. The Created data template appears in the format GT_Datatemplatename Where GT represents the Gateway Data template. It helps to understand whether the data is coming from a single thing or multiple things.
  6. Click on the newly created Gateway Data Template to Enter. You can see the columns of the Entity name, Property name, Data type, and Description.

The following table shows the function of each column.

Column NameFunction
Entity NameIt represents the things from which data is coming.
Property NameIt represents the properties of the things  which are measured.
Data type

It represents the type of data received from the thing.

DescriptionIt describes the device/ things.


Table of Content