Live File Processor Agent Example – CNL

<< Click to Display Table of Contents >>

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

Live File Processor Agent Example – CNL

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

 

OBJECT_TYPE

OBJECT_VALUE

STRING_VALUE

Description

CNL

004SeriesNames

Xe-133|Xe-135|Xe-135m

SERIES_NAMEs for CNL 004 files.

 

If this setting is not defined or empty, use the column header text in the file, on line 3 (e.g., V1, V2, and V3).

CNL

014SeriesNames

I-131|I-135|KR-87|AR-41|MIXNOB|BETA_PARTICULATES

SERIES_NAMEs for CNL 014 files.

 

If this setting is not defined or empty, use V1, V2, V3, etc.

CNL

addNullIfDatumValueIs

|NaN|NULL


CNL

folderWatcherPath

C:\EarthSoft\Live\CNL


CNL

logDatumValueParseErrors

Error


CNL

loggerCodeFileNameRegexGroups

^(?'a'[^_.]*)


CNL

processorType

CNL


CNL

utcOffsetDefaultValue

-5

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

 

 

Note: CNL can only use some of the settings defined in settings.

 

 

004 File

 

2.Copy 004 file 140303080000_Original_NoErrors.txt to C:\EarthSoft\Live\CNL.

 

 

Tuesday, September 05, 2017, 08:00

This line is not used.

Seconds        V1        V2        V3

28802.0000        1.234        0.12        0.051

28832.0000        2.34        0.36        0.049

28862.0000        3.4        0.136        0.047

 

 

The fields are separated by tabs.

Line 1: The data in the file starts on 2017-09-05 00:00:00 (08:00 is not used).

Line 3: Seconds is the number of seconds since 2017-09-05 00:00:00, and V1, V2, and V3 are the value names. (A file can have any number of values, but the first column must be Seconds.)

The DT_LOGGER_SERIES.SERIES_NAMEs are set to V1, V2, and V3, if they are not overridden by the CNL.004SeriesNames setting.

The values start on line 4, e.g. date = 2017-09-05, Seconds = 28802.0000 = 08:00:02 (8 hours, 0 minutes, 2 seconds), V1 = 1.234, V2 = 0.12, and V3 = 0.051.

2017-09-05 00:00:00 wraps to the next day (e.g., 2017-09-06 00:00:00) if the Seconds on a line is less than the Seconds on the previous line.

 

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 fourth line:

 

LOGGER_CODE

SERIES_NAME

DATUM_UTC_DT

DATUM_VALUE

140303080000

Xe-133

2017-09-05 13:00:02

1.234

140303080000

Xe-135

2017-09-05 13:00:02

0.12

140303080000

Xe-135m

2017-09-05 13:00:02

0.051

 

 

014 File

 

3.Copy 014 file 014-S_2016-May.RWF to C:\EarthSoft\Live\CNL.

 

 

2017 152 06 01 00.064  1.234  8.10  2.08  0  9.82e+02 -1.51

2017 152 06 01 00.124  5.678  2.75  0  0  1.14e+03 -1.41

2017 152 06 01 00.187  9.1011 -1.11  6.47  0  9.93e+02 -5.45

 

 

The fields are separated by spaces.

The file has no header line; each line is formatted like: YYYY DoY MM DD HH.HHH V1 V2 V3 V4 V5 V6, where:

a.YYYY is the year.

b.DoY is the day of year (can be any value, it is not used).

c.MM is the month.

d.DD is the day.

e.HH.HHH is the hour, formatted as a decimal number (e.g., 00.064 = 00:03:50 (0 hours, 3 minutes, 50 seconds)).

f.V1, V2, V3, V4, V5, and V6 are the values. (A file can have any number of values.)

The DT_LOGGER_SERIES.SERIES_NAMEs are set to V1, V2, V3, V4, V5, and V6, if they are not overridden by the CNL.014SeriesNames setting.

 

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 first line:

 

LOGGER_CODE

SERIES_NAME

DATUM_UTC_DT

DATUM_VALUE

014-S

I-131

2017-06-01 05:03:50

1.234

014-S

I-135

2017-06-01 05:03:50

8.1

014-S

KR-87

2017-06-01 05:03:50

2.08

014-S

AR-41

2017-06-01 05:03:50

0

014-S

MIXNOB

2017-06-01 05:03:50

982

014-S

BETA_PARTICULATES

2017-06-01 05:03:50

-1.51