Overview
The File Import Module allows users to manually import data or set up an automated data import stream. This article will cover the process of creating a Manual Import profile and importing data into iTwin IoT. The manual import consists of bringing one file in at a time via the created import profile. If configured correctly, data for multiple sensors of the same type can be imported from a single file. The process of creating a manual import or automatic import is the exact same, you will always have the option of sending data automatically to a File Import.
Clicking the "Sensors" option on the left toolbar will present you with these options. You click the "File Import" option to access this feature.
You will now be in the File Import Main page, as shown below. Once on this page you can create a new import by clicking the "+ Import" button in the upper left.
When you create a new File Import you currently have three options for what type of data is being imported.
The types are as follows:
Time Series Data - This is for a wide variety of Time series data for many different file types and data formats. Currently the File Import only supports .csv, .txt and .dat file types.
Measurand Shapearray (SAA) - This is a specific import type for Measurand's SAA sensors. This can be a file that is coming from a Campbell Scientific logger or an RST logger for example. You can upload the file first and then have the loggers send all future data to the FTP location that this file import will create.
DGSI Manual Inclinometer - This is a specific import for DGSI's Manual Inclinometer data. This data can either be uploaded manually directly through iTwin IoT's web interface or via Filezilla from your computer using the FTP location that this file import will create.
1. New Import Profile- Once on the File Import main page, clicking the blue "+Import" icon opens the File Import configuration page, followed by the Import type selection, allowing the user to begin configuring a new import profile (example seen below).
Please take note of the difference between a Row based sensor file and Column based sensor file.
A Row based sensor file is used for this example but it is not always the case. A row based sensor file means that there is a column that contains the info on what sensors data is in that row. Then all other rows will represent the timestamp for the observation of that sensor and the metrics for that sensor. In this case the "Sensor names column" is a required selection.
A Column based sensor file means that each column contains one metric, you can then decide if your sensor contains only one metric or multiple. You can configure this however you like. This means that there is no column in the file that defines what the sensor is. The columns name in the header defines that. For this case the "Sensor names column" option turns into "Sensor names row" and becomes optional.
2. Import Name - Name the Import profile.
3. File Upload - A file can be dragged and dropped into the upload area or you can click the blue "Choose a file" button to open a file-selection window. Select the file to be imported. Once a file has been selected, the window will be populated with the file data on the right side of the screen, Illustrated below, and the additional configuration of the import can be completed.
4. Time Stamp Column - Select the column that contains the timestamp for the sensor data (date and time of data collection). Once a selection is made, a box will appear below the selected column, and you will need to configure the timestamp. For more information about Timestamp configuration, please visit the Timestamp Configuration knowledge article.
5. Time Zone- Select the time zone of the data in the import file. (It is important to remember that data in iTwin IoT will be stored in a certain time zone, but data visualization in iTwin IoT will convert that data to reflect the time zone selected on the computer of whomever is viewing the data.)
6. Advanced Parsing- Parsing rules may need to be adjusted to ensure the data is imported correctly. When configured correctly, the data on the right side preview should look similar to the image below. Parsing rules are automatically applied to the data preview on the right, allowing the user to ensure that the correct parsing rules are selected for the file to be imported. If the data in the data preview window doesn't look correctly parsed, you may need to adjust the Advance Parsing settings, explained below.
6a. Delimiter - Select the delimiter the file is using as the field qualifier from the dropdown options. Comma is the default selection for iTwin IoT.
6b. Text Qualifier - Select the qualifier the file is using for text.
6c. Text Encoding - Define the text encoding manner of the file.
The sensor configuration(7) section allows you to map the data from your import file to existing sensors within your project or to create new sensors to hold the imported data. This is also where you will define the sensor type and match the spreadsheet data to the corresponding metrics and metric units in iTwin IoT.
7a. File Direction - It specifies the orientation of the sensor data within the file. You can choose between two options:
Rows - Each sensor's data is spread across one or more rows.
Columns- Each sensor's data is organized in one or more columns.
7b. Sensor Names Column - This mandatory dropdown menu allows you to select the column in your file that contains the names of the sensors. This is most common if there are multiple sensors on a single file. Once a selection is made, the "Sensors" section below will be populated with a configuration box for each sensor identified in the selected column. In the screenshot, "Column 1" is selected. This is not a required option if you are using a Column Based file direction.
7c. Metrics and Units Rows - These optional dropdown menus allow you to specify if there are particular rows in your file that define the metrics (e.g., Temperature, Pressure) and their corresponding units (e.g., °C, kPa).
Metrics row - Select the row containing the names of the metrics.
Units row - Select the row containing the units for the measurements.
7d. Sensors - After configuring the "Sensor names column," this section will list the individual sensors found in your file. For each sensor identified, you have two configuration options: "Existing" or "New". "Existing" option is chosen to map the imported data to a sensor that already exists in the system. "New" option is chosen to create a new sensor record in the system with this data.
Additionally, a "Batch-create" button is available, which allows for the creation of multiple new sensors at once, streamlining the process when dealing with files containing data from many new sensors.
a. Predefined
b. Custom
I. Metric - This input field is where you name the measurement being captured in the column. For example, if column 4 contains temperature readings, you would enter "Temperature" here.
II. Unit - This input field is where you specify the unit of measurement for the metric you just defined. For the "Temperature" example, you might enter "Celsius," "Fahrenheit," or "Kelvin."
It allows you to create multiple sensors simultaneously using a template and patterns in your data. It automates the process by applying a common configuration to data from specified columns, which saves significant time and effort.
a. Predefined - Creates sensors based on an existing template.
I. Refresh list - Updates the list of available predefined sensor types.
II. Select predefined sensor type - A mandatory dropdown where you select the template that will be used for all the sensors in this batch.
b. Custom - It allows you to create a new sensor definition from scratch, which will be applied to all sensors in the batch. Selecting this option reveals the "Map metrics and units" section below.
I. Refresh list - Updates the mapping interface.
II. Always use metric from metrics row - This toggle is currently off. When off, the "Metric" and "Unit" you define manually in the "Column 4" section below will be applied uniformly to every sensor created in this batch. If this were toggled on, the system would instead try to find the metric name and unit for each sensor from a specific row in your data source, allowing for different metrics to be defined within the same batch operation.
III. Column 3 - Since the toggle above is off, this section acts as the template for all custom sensors in the batch.
i. Metric - Enter the name of the measurement here (e.g., "Pressure," "Voltage"). This name will be used for every sensor created.
ii. Unit - Enter the unit of measurement (e.g., "PSI," "Volts"). This unit will be used for every sensor created.
Alarms can be configured to let you know if issues occur during the import.
9. Save and import - Once the configuration of the Manual Import profile is complete, the "Save and import" button, placed at top right corner of screen, will turn blue, indicating that the Import can be completed. Clicking "Save and import" will begin the import process.
After selecting the Measurand ShapeArray option for your File Import you can either drag and drop the relevant SAA file or click "upload" and select the file from a file browser.
Once that is done you will only need to set the name of the import, timezone, timestamp format and then define which sensor you intend to assign this import to. You can assign it to an already existing sensor or a new one.
Selecting device
Here you can either select an existing device or create a new one for your import.
Alarms
Alarms can be configured to let you know if issues occur during the import.
Saving and Importing
Once you have everything correctly configured you can import the file.
If you need to configure the SAA any further then you can do so via the Explorer module. You can set cyclical adjustment, anti-rotation, convergence mode, reference date, configure the depth and length of each sensor, configure which end is fixed and if it is horizontal or vertical.
After selecting the DGSI Manual Inclinometer option for your File Import you can either drag and drop the relevant SAA file or click "upload" and select the file from a file browser.
Once that is done you will only need to set the name of the import, timezone, timestamp format and then define which sensor you intend to assign this import to. You can assign it to an already existing sensor or a new one.
If you want to import the data for your File Import automatically via FTP or to upload it manually please navigate to the Automatic and Manual File Import knowledge article.