Skip to main content

How to use the CoolPlanetOS file parser

You can easily sync data in the form of static files using the CoolPlanetOS file parser

P
Written by Product Marketing
Updated over 2 years ago

CoolPlanetOS can easily ingest manual files into the system using the file parser functionality. At present the initial configuration of the file parser must be done in conjunction with the CoolPlanetOS Customer Success team. If you need assistance with this please email support@clarityiq.io

It is very important not to alter the format after the parser is setup, any changes in the file will need to be reflected in the parser. This includes the name of a tab if an excel format is being used.

File Format

The format of the file is very important and once configured it must remain in the same format or the file parser will not work correctly. This following sections will look at the various options and configurations available.

It is important that the format of the file follows roughly the below example with headings along the the same row and timestamps/data going vertically down the columns

Date

Time

Data2

Data3

Data4

Data5

Data6

Data7

2021-01-01

00:00

123kW

100hL

22kg

1L

7.765kWh

1

2021-01-01

00:15

321kW

12hL

24kg

0L

2.223kWh

0

2021-01-01

00:30

1kW

1hL

22kg

0L

1.754kWh

1

File Types

There are two file types that work with this system, CSV and Microsoft Excel (xls or xlsx).

Configurable Fields

There are a number of fields that can be configured for the file parser, some are required always, others are only required depending on the file type and some are an either or (date/time or timestamp). Here is a brief summary on these fields

SiteRef

Each parser is specific to a site within the client so we need to know which site the data belongs to.

FileType

Whether the file is an Excel format or text in the format of a CSV file

Column Separator

If the file is in CSV format the system can also handle various different characters to act as the separator the options available are;

  • Comma ","

  • Tab " -> "

  • Colon ":"

  • Semicolon ";"

  • Space " "

  • Pipe "|"

Decimal Point

Whether a comma "," or full stop "." should be used to denote a decimal point within a number. This will vary from region to region os the correct usage should be selected.


Time and date settings

There are varying configuration and combinations of data required ofr the time and date settings. If you have a timeStamp that includes date and time such as "YYYY-MM-DD ' 'hh:mm:ss" then you need timestampColName and timestampFormat. The timestampColName should be the heading of the column that represents the time and date timestamp, the format of which should be consistent and is decoded by the timestampFormat.

If you have separate Time and Date columns you will need four columns dateColName, dateFormat, timeColName, timeFormat

Timezone

No matter which date and time setup you have (separate column or one timestamp column) you will need to select the timezone for the data, this will normally match the timezone of the site that it references.


Column Header Row

This is the numerical number of the row in which the headers sit, the first row is 1 so if the name of the columns we are looking for is contained in the second row it this number would be 2 or as per the example above the column header row would be row 1.


Column Qualifier Row

Enables the use of a second Column Header Row, so names from the first will be suffixed with the string in the same column position in the qualifier row. If set to 0 it is not used. An example of where this might be used is in the below table. In the below example the column header row would be 1 and the column qualifier row would be 2. This would then create a separate point for Coarse Meal and Ground Meal.

Date

Type

Description

Meal

Meal

Cubes

Pellets

Totals

Coarse

Ground

23/04/2021

Product

Totals:

1.012

7.497

98.532

3.139

94.180

23/04/2021

Waste

Totals:

49.217

2.999

176.653

6.027

212.895

Column Qualifier Column

Use this to specify the name of a column whose cell values (normally a string) will be used to qualify which point will be filled with the value from any of the configured expected columns. This handles the case where Line Name is one column and Production Quantity is another. Parsing will result in many points as there are distinct values in the Line Name column.

In the above table we could set "Type" to be the column qualifier column and for each column it would create a Product point as well as a separate waste point.

First Data Row

The row number where the first data row is found. The default is 2, if additional rows need to be skipped increment this. In the above table this would be set to 3.

Excel Sheet Name/ Excel Sheet ID

The name of the sheet that will be used form an excel sheet. If this is not present we can also use excel Sheet Id. The excel sheet ID takes the form of an index from 1 up.

Did this answer your question?