Measurement settings

The Measurement Settings section configures how CSV data is interpreted and mapped into measurements. This includes defining how each column in the CSV file is used, setting up filters for data inclusion, and specifying data quality indicators.

Measurement settings

ValueColumn

Description: Column of the value in the csv file for this measurement.
Required: yes
Example: 6

Filter

Description: Filter to parse only the rows that match the filter. The filter is a JSON object where the key is the column index (as a string) and the value is the value to match. If multiple values in the same column should be matched, separate them with a semicolon.
Required: yes
Details:

  • Key: CSV column index as a string.
  • Value: Names used for mapping, separated by semicolons if multiple.

Example:
In the following example, the filter will only parse rows where the value of the first column is Example value or the value of the second column is match with this or also match with this. \

1
2
3
4
{
  "0": "Example value",
  "1": "match with this;also match with this"
}

StatusGood

Description: All values that are mapped to status ‘Good’. Multiple statuses can be configured using semicolon separated values.
Required: no
Example: “Valid;correct”

Checkout the data collection methods section for more information.

TimestampLayout

Description: The layout of the timestamp, defaults to the TimestampLayout setting on the collector. More info: https://pkg.go.dev/time#Layout
Required: no

TagsInCSV

Description:This allows to add tags to the measurement with the tag value coming from csv data. The structure of this setting is similar as the Filter setting. The json key is the column index (as string) where the tag value is present, and the json value is the tag key (or tag name) under which the data should be stored upon the measurement:
Required: no
Example:{"4": "Description"}

Examples

Example 1

This example demonstrates setting up a collector and measurement for a CSV with multiple sensor data.

Given the following CSV format, with files being provided by a data source located in Europe/Brussels.

Time,Name,Value,Unit,Quality
"1/12/2023 13:00:01.868",P99,"0.00",,Good
"1/12/2023 13:01:01.876",P99,"0.00",,Good
"1/12/2023 13:02:01.863",P99,"100.00",,Good
"1/12/2023 13:03:01.840",P99,"100.00",,Good
"1/12/2023 13:00:01.868",TT100,"27.51",,Good
"1/12/2023 13:01:01.876",TT100,"26.04",,Good
"1/12/2023 13:02:01.863",TT100,"25.97.00",,Good
"1/12/2023 13:03:01.840",TT100,"26.23",,Good

Collector Settings

Setting Value
Delimiter ,
CSVHeader true
TimestampColumn 0
TimestampLayout 2/01/2006 15:04:05.000
StatusColumn 4
TrimString No Value
Advanced Setting Value
SourceTimezone Europe/Brussels

Measurement Settings

Setting Value
Name Area_Pump99
ValueColumn 2
Filter { “1”: “P99” }
StatusGood Good
TagsInCSV {}
TimestampLayout No Value
Setting Value
Name Area_Temperature100
ValueColumn 2
Filter { “1”: “TT100” }
StatusGood Good
TagsInCSV {}
TimestampLayout No Value