Live File Processor Agent Example – Solinst

<< Click to Display Table of Contents >>

Navigation:  Live > Agents > File Agents > File Processor > Examples >

Live File Processor Agent Example – Solinst

1.Add the following settings to the ST_CONFIG table (CONFIG_SECTION = 'Live.FileProcessor', CONFIG_KEY = 'Agent').

 

OBJECT_TYPE

OBJECT_VALUE

STRING_VALUE

Description

Solinst

dateTimeColumnHeaderRegex

Date

DT_LOGGER_DATUM.DATUM_UTC_DT date; column header text contains Date.

Solinst

folderWatcherPath

C:\EarthSoft\Live\Solinst


Solinst

headerLinesRegex

Date.*Time

The header line contains Date + anything (.*) + Time.

Solinst

loggerCodeHeaderLinesRegexGroups

^Location.*\n(?'a'[^:,]*)

DT_LOGGER.LOGGER_CODE; two lines, separated by a '\n'; the logger code is on the second line, before the colon or comma.

Solinst

timeColumnHeaderRegex

Time

DT_LOGGER_DATUM.DATUM_UTC_DT time; column header text contains Time.

Solinst

utcOffsetDefaultValue

-5

DT_LOGGER_DATUM.DATUM_UTC_DT = file dates and times + 5 hours (Eastern Standard Time; UTC – 5 hours; not adjusted for DST).

 

2.Start the agent and copy the following file to folder C:\EarthSoft\Live\Solinst.

 

 

Location:,,,,

SpringField,,,,

Level,,,,

UNIT: m,,,,

Offset: 35.000000 m,,,,

Temperature,,,,

UNIT: Deg C,,,,

Date,Time,ms,Level,Temperature

10/2/2011,16:00:00,0,1.4393,9.698

10/3/2011,20:00:00,0,1.3936,9.498

10/4/2011,0:00:00,0,1.371,9.487

 

 

3.The line after the Location contains the the DT_LOGGER.LOGGER_CODE column. Find/add the logger row. For example:

 

LOGGER_CODE

LIVE_DATA_SOURCE

UTC_OFFSET_HRS

SpringField

COMPUTER_NAME/C:/EarthSoft/Live/Solinst

-5 (= utcOffsetDefaultValue)

 

4.The file's Date,Time line is the header line; it contains the DT_LOGGER_DATUM.DATUM_UTC_DT columns Date and Time. The other columns are the series; they contain DT_LOGGER_SERIES.SERIES_NAMEs.

 

5.For each subsequent line:

a.For each series (each column, excluding Date and Time columns):

i.Find/add the series row for the SERIES_NAME.

ii.Add the datum row (e.g., for the first data line):

 

SERIES_NAME

DATUM_UTC_DT

DATUM_VALUE

SERIES_UNIT

ms

2011-10-02 21:00:00 (= 2011-10-02 16:00:00 - utcOffsetDefaultValue)

0

NULL

Level

2011-10-02 21:00:00

1.4393

NULL

Temperature

2011-10-02 21:00:00

9.698

NULL

 

 

Notes:

The series units, m and Deg C, in the file's header, lines:
 
Level,,,,
UNIT: m,,,,
 
Temperature,,,,
UNIT: Deg C,,,,
 
are not added to DT_LOGGER_SERIES.SERIES_UNIT; seriesUnitColumnHeaderRegexGroups requires the units to be in the headerLinesRegex lines, and to be in the same column as their series names.
 
A SERIES_UNIT and/or SERIES_DESC may be added later, manually, but the SERIES_NAME cannot be changed, it uniquely identifies the series.

The 35.000000 m Level Offset, in the file's header, lines:
 
Level,,,,
Offset: 35.000000 m,,,,
 
is not added to the datum values.
 
The Data Computation Agent or Data Deriver Agent may be used to add the offset.