The widget that permits to Import data of multiple metrics to a specific thing.
The widget requires a thing in the context, so it can be placed only in a template used by a view of a thing definition.
By pressing the Import button, the user is requested to provide the CSV file containing all the data of the metrics to be imported to the context thing.
The first row of the CSV must be the header composed by the TIMESTAMP
column, and a column for each metric to import (the header is the metric name).
You can download a sample CSV to be used as starting point of your import.
You can import data for any raw and computed (derived and counter) metric.
The order of the TIMESTAMP
column must contain UTC values (long) in ascending order.
TIMESTAMP,<metric-name>,<metric-name>,<metric-name>,<metric-name>
1234567,22.5,true,"test text 1"
1234568,22.6,false,"test text 2"
By confirming, a data import is scheduled, and within the widget you can see the status of the data imports.
The time required to process a CSV file depends on the number of rows and columns to import.
Please note that data is saved as it is provided in the CSV file, and any events or insights related to the imported data period are not recalculated.
The widget is based on this API endpoint.
Configuration
Template Syntax
Below you can find some examples of how to use the component within a template.
<data-import-widget [title]="'Data Import'"></data-import-widget>
Component Reference
Here is a comprehensive list of all the elements and properties that can be used to configure the component.
Data Export <data-import-widget>
Title | The title displayed on the top part of the widget box. Name: title Type: STRING | Optional
|
Rendering | |
CSS Class | The name(s) of the CSS class used to customize the widget layout. Name: class Type: STRING | Optional
|
Visibility Condition | The expression that allows you to reduce the visibility of the element. Name: *ngIf Type: STRING | Optional
|