Live File Processor Agent Example – LoggerDatum

<< Click to Display Table of Contents >>

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

Live File Processor Agent Example – LoggerDatum

Add the LoggerDatum settings below to the ST_CONFIG table using the Live File Processor widget:

 

Settings

 

OBJECT_TYPE

OBJECT_VALUE

STRING_VALUE

Description

LoggerDatum

dateTimeColumnHeaderRegex

(?i)DatumUtcDate

DT_LOGGER_DATUM.DATUM_UTC_DT

LoggerDatum

datumQualifierColumnHeaderRegex

(?i)DatumQualifier

DT_LOGGER_DATUM.DATUM_QUALIFIER (optional)

LoggerDatum

datumValueColumnHeaderRegex

(?i)DatumValue

DT_LOGGER_DATUM.DATUM_VALUE

LoggerDatum

delimiters

 ,

The fields are separated by tabs and/or commas.

LoggerDatum

facilityCodeColumnHeaderRegex

(?i)FacilityCode

DT_LOGGER.FACILITY_ID (optional)

LoggerDatum

facilityIdColumnHeaderRegex

(?i)FacilityId

LoggerDatum

folderWatcherPath

C:\EarthSoft\Live\
LoggerDatum


LoggerDatum

loggerCodeColumnHeaderRegex

(?i)LoggerCode

DT_LOGGER.LOGGER_CODE

LoggerDatum

seriesNameColumnHeaderRegex

(?i)SeriesName

DT_LOGGER_SERIES.SERIES_NAME; any SERIES_UNIT and SERIES_FUNCTION

LoggerDatum

seriesUnitColumnHeaderRegex

NULL

There is no series unit in this example file. Thus, this value is set to null so that it can manually be updated a series' series_unit after the file data is loaded. See here for more info.

LoggerDatum

sysLocCodeColumnHeaderRegex

(?i)SysLocCode

DT_LOGGER.SYS_LOC_CODE (optional)

LoggerDatum

updateExistingValues

false


 

1.Start the agent and copy the following file to folder C:\EarthSoft\Live\LoggerDatum.

 

 

LoggerCode,SeriesName,DatumUtcDate,DatumValue,DatumQualifier

"ABC","Distance","2018-02-13 06:40:28","2.3",

"ABC","Volume","2018-02-13 06:41:21","4.5","I"

"ABC","Volume","2018-02-13 06:41:43","4.7",

 

 

2.The file's first non-empty line is the header line (because headerLinesRegex is not defined); it contains the DT_LOGGER.LOGGER_CODE, DT_LOGGER_SERIES.SERIES_NAME, and DT_LOGGER_DATUM.DATUM_UTC_DT, DATUM_VALUE, and DATUM_QUALIFIER columns. (DT_LOGGER.FACILITY_ID/CODE and SYS_LOC_CODE columns may also be added to a file.)

 

3.For each subsequent line:

a.Find/add the logger row for the LoggerCode, e.g., for the file's second line:

 

LOGGER_CODE

LOGGER_DESC

LIVE_DATA_SOURCE

UTC_OFFSET_HRS

ABC

NULL

COMPUTER_NAME/C:/EarthSoft/Live/LoggerDatum

0

 

b.Find/add the series row for the SeriesName to the above logger row (linked via LOGGER_ID), e.g., for the file's second line:

 

SERIES_NAME

SERIES_UNIT

SERIES_FUNCTION

Distance

Any

Any

 

c.Add the datum row for the DatumUtcDate, DatumValue, and DatumQualifier to the above series row (linked via LOGGER_SERIES_ID), e.g., for the file's second line:

 

DATUM_UTC_DT

DATUM_VALUE

DATUM_QUALIFIER

2018-02-13 06:40:28

2.3

NULL