---
title: IOT Datasource
description: Set up and manage IoT Datasources, configure data tables, create calculated columns, and upload JSON files seamlessly.
---
import { Aside, Steps } from '@astrojs/starlight/components';
import { MediaPlayerComponent } from "../../../../../components/video-player";
import RunScript from "../../../../../components/RunScript.astro";

# IOT Datasource

<MediaPlayerComponent video="Create-A-Datasource-Using-IOT.mp4"
chapters={[
  {
    "start": 0,
    "end": 8,
    "text": "Click Datasources under Studio",
    "description": "From the Infoveave menu, click 'Studio', then click 'Datasources' from the dropdown menu. Wait for the datasources list to load."
  },
  {
    "start": 8,
    "end": 10,
    "text": "Create New Datasource",
    "description": "Click the New Datasource button in the top right corner. This will display various datasource types."
  },
  {
    "start": 10,
    "end": 14,
    "text": "Select IoT Datasource Type",
    "description": "Scroll down or go to the Others section and click IoT to begin configuring a new IoT datasource."
  },
  {
    "start": 14,
    "end": 18,
    "text": "Upload JSON File and Connect",
    "description": "Click Please select file and choose your JSON file. Verify the connection settings, then click Next."
  },
  {
    "start": 18,
    "end": 27,
    "text": "Name the Datasource and Configure Table",
    "description": "In the Datasource name field, enter IOT Temperature data. Click the Edit icon next to the table name, rename it to IOT_Temp_Data, check Add upload date, then click Update."
  },
  {
    "start": 27,
    "end": 37,
    "text": "Add Calculated Column",
    "description": "Click Add calculated column, name it event_date, and paste the JavaScript formula to extract the date from time_stamp. Click Validate, then Add column."
  },
  {
    "start": 37,
    "end": 45,
    "text": "Review and Save Table Schema",
    "description": "Click the Table schema icon, review all columns including calculated ones, then click Save."
  },
  {
    "start": 45,
    "end": 55,
    "text": "Define Measure",
    "description": "Right-click on time_stamp, select Add measure, set Aggregation to Sum, and click Add measure."
  },
  {
    "start": 55,
    "end": 64,
    "text": "Define Dimension (Device ID)",
    "description": "Right-click on dev_id, select Add dimension, and click Add dimension to categorize by device."
  },
  {
    "start": 64,
    "end": 68,
    "text": "Define Dimension (Location)",
    "description": "Right-click on location, select Add dimension, and click Add dimension to categorize by location."
  },
  {
    "start": 68,
    "end": 76,
    "text": "Final Save of Datasource",
    "description": "Click the Save button in the top right corner. A confirmation message will confirm the IoT datasource was saved successfully."
  }
]
}
poster="/images/introduction-poster.png"
posterText="Creating A Datasource Using IOT"
client:load/>

Collect real-time data from IoT devices operating at consistent intervals in Infoveave. Through a specialized custom URL connected to the designated Datasource, Infoveave collects and updates the linked Datasource to provide actionable insights.

## Creating a Datasource Using IOT

<Aside>  
The configuration settings may vary depending on the file type you choose.  
</Aside>

<Steps>  
1. To access Infoveave Datasource types, navigate to **Studio** <i class="fa-duotone fa-regular fa-arrow-right"></i> **Datasources**.  
All types of Datasources created by you or shared with you are displayed under **My Datasources** and **Shared Datasources**.  
2. To create a new Datasource, click on **New Datasource**.  
3. Choose **IOT** as the Datasource type.  
![IoT_Datasource](/images/iotdatasource.png)  
4. Upload the JSON file from your local storage. Please note that the maximum file size allowed for upload is 100 MB.  
![New IOT Datasource Configuration](/images/New-IOT-Datasource-Configuration.png)  
5. Choose the connection type for your Datasource. In this case, the connection type is set to default.  
6. Once the file is processed, a tabular preview of the data appears. This also shows the sheet name in the delimited file.  
![iot preview](/images/iotconfig.png)
7. Provide a name for your Datasource.  
8. To add additional files to supplement your Datasource, click on the **Add files** option.  
9. To customize the **Table name** and choose the **Ingestion type**, click on the **Edit** icon <i class="fa-duotone fa-regular fa-pen"></i> next to the table name. Configure the following fields in this section.  
    * **Table name** Specify the desired table name.  
    * **Ingestion type** Choose from options such as **Incremental**, **Truncate and Reload**, or **Update** to define how new data is integrated into the existing dataset.  
    * **Date column exists** This checkbox identifies the date column in your dataset by default.  
    * **Add upload date** If you wish to include an upload date column, select this checkbox. This is helpful for tracking when new data is added to the dataset.  
</Steps>

* **Incremental** With the "Incremental" ingestion type, new data is added to the existing dataset without affecting the already loaded data. This mode is ideal when you want to continuously append new records to your dataset without modifying or reloading the existing information. It is efficient for scenarios where your dataset is frequently updated.
* **Truncate And Reload** Selecting "Truncate and Reload" means that the existing dataset is completely replaced with the new data. This mode is useful when you want to refresh your dataset with the most recent information and remove any previous data. It is suitable for scenarios where the entire dataset needs to be updated periodically.
* **Update** In this mode, Infoveave identifies matching records between the new data and the existing dataset based on defined keys. Updated records are replaced while new records are added. This mode is efficient when you want to refresh your dataset with new information and update existing records without starting from scratch.

<Steps>
10. Click on the column header of the tabular view to set the following options.  
    * **Column Type** Change the column data type.  
    * **Auto Size All Columns** Automatically adjust the column width to fit the data.  
    * **Fit to Chart** Set the visibility of the data for quick viewing.  
11. Enable the **Upload the selected file** option to upload the data to the table structure.  
12. To make any changes to the data table, select the required one and click **Previous**.  
13. Use the [Add calculated column](/studio-v8/datasources/calculated-columns-datasource) feature to create a new column with calculated values that are not available in the original dataset. This is especially useful for performing custom calculations on your data.  
14. To define the measures and dimensions on the dataset, click on **Next**.  
![Table Schema](/images/iotschema.png)  
15. The table schema appears for you to rename the column if required.  
16. Click on **Save** to save the updated table schema. You are redirected to the Datasource Designer.  
![datasource window](/images/iotdatasourcecreated.png)  
17. The Datasource you create is available in the designer window.  
![IoT Data URL](/images/IoT-Data-URL.png)  
18. To upload data to the IoT Datasource, use the HTTP URL that appears when you click the **Upload data** icon.  
</Steps>


To learn about adding measures and dimensions to the data table, visit [Measures and Dimensions](/studio-v8/datasources/measures-dimensions-and-hierarchies).

To learn about adding calculated columns, visit [Calculated Columns](/studio-v8/datasources/calculated-columns-datasource#configuring-calculated-columns).

To learn about adding calculated measures, visit [Calculated Measures](/studio-v8/datasources/calculated-measures#configuring-calculated-measures).

<Aside>
* Table Name can only contain characters and numbers.  
* Add multiple data tables to the designer with simple drag and drop.  
* A Datasource must have at least one measure and one dimension to enable the **Save**.  
* Ensure you have selected the appropriate dataset to which you want to add the calculated column before proceeding.  
* You must configure a [Workflow](/automation-v8/jobs-v8/) to upload the data to the IoT Datasource.  
</Aside>






