Live Data Computation Agent – SQL Variables

<< Click to Display Table of Contents >>

Navigation:  Live > Agents > Transformation Agents > Data Computation >

Live Data Computation Agent – SQL Variables

The Data Computation Agent includes the following SQL variables, which may be used in the value or procedure SERIES_FUNCTION_INFO parameters.

 

Variable

Type

Description

@start_date

DATETIME2(0)

Report parameter; Start Date, inclusive.

@end_date

DATETIME2(0)

Report parameter; End Date, inclusive.

@save_changes_to_database_yn

VARCHAR(1)

Report parameter; 'Y' or 'N'.

@update_existing_data_yn

VARCHAR(1)

Report parameter; 'Y' or 'N'.

@insert_new_data_yn

VARCHAR(1)

Report parameter; 'Y' or 'N'.

@delete_existing_data_yn

VARCHAR(1)

Report parameter; 'Y' or 'N'.

@target_series_id

BIGINT

Computed series' LOGGER_SERIES_ID.

@source_series_ids

VARCHAR(?)

Computed series' DT_LOGGER_SERIES.SERIES_FUNCTION_INFO sourceSeriesId array, pipe separated, e.g. 130041|130032|130033. SQL function equis.split() may be used to split the ids into a table, as shown here.

@value_yn

VARCHAR(1)

'Y' if computed series' DT_LOGGER_SERIES.SERIES_FUNCTION_INFO has a (non-empty) value, else 'N'.

@facility_id

BIGINT

Computed series' DT_LOGGER_SERIES.FACILITY_ID, if not NULL, otherwise DT_LOGGER.FACILITY_ID.

@sys_loc_code

VARCHAR(20)

Computed series' DT_LOGGER_SERIES.SYS_LOC_CODE, if not NULL, otherwise DT_LOGGER.SYS_LOC_CODE.

@logger_id

BIGINT

Computed series' DT_LOGGER.LOGGER_ID.

@logger_code

VARCHAR(64)

Computed series' DT_LOGGER.LOGGER_CODE.

@logger_desc

VARCHAR(256)

Computed series' DT_LOGGER.LOGGER_DESC.

@utc_offset_hrs

REAL

Computed series' DT_LOGGER.UTC_OFFSET_HRS.

@series_name

VARCHAR(64)

Computed series' DT_LOGGER_SERIES.SERIES_NAME.

@series_desc

VARCHAR(256)

Computed series' DT_LOGGER_SERIES.SERIES_DESC.

@series_unit

VARCHAR(15)

Computed series' DT_LOGGER_SERIES.SERIES_UNIT.

 

Note: d may also be used in the value (but not procedure) SERIES_FUNCTION_INFO parameter; it refers to a source series DT_LOGGER_DATUM row, also ? refers to d.datum_value, i.e.:

 

? = d.datum_value = a source series DT_LOGGER_DATUM.DATUM_VALUE.

 

d.datum_utc_dt = a source series DT_LOGGER_DATUM.DATUM_UTC_DT.