Delimited

<< Click to Display Table of Contents >>

EQuIS 7  >>  Enterprise > EQuIS Live > Agents > File Processor >

Delimited

The File Processor supports delimited (e.g., comma separated) value files with a header, and DT_LOGGER.LOGGER_CODE and DT_LOGGER_DATUM.DATUM_UTC_DT columns.

 

Example

 

This example uses these App Settings. It watches the 'C:\a folder\delimited' folder (folderWatcherPath app setting) for new files, or changes to existing files.

 

File

 

Copy this file to 'C:\a folder\delimited'.

 

 

Pump,Date and Time,Power(kWh),Voltage(V),Input Current(A),Motor Current(A),Flow(m³/h),Pressure(m)

1234,10:03 16 May 2017,0,120.0,0,0,0,1.0

1234,10:14 16 June 2017,0,119.8,0,0,0,1.1

1234,10:23 16 July 2017,0,122.3,0,0,0,1.2

5678,10:01 16 May 2017,0.18,58.2,2.9,3.04,1.27,2.0

5678,10:11 16 June 2017,0.22,57.9,3.39,3.39,1.34,2.1

5678,10:21 16 July 2017,0.21,59.1,3.48,3.48,1.32,2.2

91011,10:02 16 May 2017,0,70.1,0,0,0,0.2

91011,10:13 16 June 2017,0.21,68.8,3.39,4.73,1.09,0.2

91011,10:22 16 July 2017,0.22,67.1,3.37,4.71,1.03,0.1

 

 

The fields are separated (delimited) by commas (and may be enclosed in double quotes).

The file's header is on line 1, and the values start on line 2.

The Pump column is the DT_LOGGER.LOGGER_CODE.

The Date and Time column is the DT_LOGGER_DATUM.DATUM_UTC_DT.

The other columns, e.g. Power(kWh), are the DT_LOGGER_SERIES.SERIES_NAMEs (and SERIES_UNITs).

 

The agent adds the following DT_LOGGER, DT_LOGGER_SERIES, and DT_LOGGER_DATUM rows to the database for the data in the file's second line:

 

LOGGER_CODE

LOGGER_DESC

LIVE_DATA_SOURCE

UTC_OFFSET_HRS

1234

Pump # 1234 (= loggerDescPrefix app setting + LOGGER_CODE)

folder://EARTHSOFT/
C:/a folder/delimited

0 (= utcOffsetHrs app setting)

 

SERIES_NAME

DATUM_UTC_DT

DATUM_VALUE

SERIES_UNIT

Power

2017-05-16 10:03:00

0

kWh

Voltage

2017-05-16 10:03:00

120

V

Input Current

2017-05-16 10:03:00

0

A

Motor Current

2017-05-16 10:03:00

0

A

Flow

2017-05-16 10:03:00

0

m³/h

Pressure

2017-05-16 10:03:00

1

m

 

Pseudocode

 

First, the agent reads the file's header line, to find out where the DT_LOGGER.LOGGER_CODE and DT_LOGGER_DATUM.DATUM_UTC_DT columns are located, and what the DT_LOGGER_SERIES.SERIES_NAMEs (and DT_LOGGER_SERIES.SERIES_UNITs) are, for each column.

 

Then, for each line that follows, it adds:

1.A DT_LOGGER row, if one does not already exist for the LOGGER_CODE in the line, with a LIVE_DATA_SOURCE equal to 'folder://{computer name}/{folderWatcherPath}'.

2.A DT_LOGGER_SERIES row, for each column (excluding loggerCodeColumnName and dateTimeColumnName columns), if the series does not already exist for the DT_LOGGER row.

3.A DT_LOGGER_DATUM row, with the DT_LOGGER_DATUM.DATUM_UTC_DT column's date and time (minus the DT_LOGGER's UTC_OFFSET_HRS), and value.