Charting of Non-Live Data
Copyright © 2019 EarthSoft, Inc • Modified: 04 Mar 2019
The idea is to allow charting non-live or live-related time-series data on the Live Historical widget.
Currently, the Historical Chart Widget allows Live data to be charted among non-Live data by use of the Date Series Data Report. This may not always work, especially when some calculations/post-processing is needed. An alternative is to setup a derived series for a Data Deriver Agent that will perform necessary calculations/post-processing.
Since there is a certain overhead to setup derived series manually, EarthSoft added a feature to define a table-valued SQL function as a data source for the series. By default, data for a series is stored in DT_LOGGER_DATUM. This approach allows to define a live series and pull data from another EQuIS table, and/or create a series by applying calculation to another series inside the function.
1.Create a series.
2.Set series_function for this new series to: sql_fn.
3.Set series_function_info for this new series to the name of the function that returns the data.
This function (from Step 3) must accept two parameters:
@logger_series_id integer – ID of the series for which the function is being called
@start_date datetime – Start date of data to return (passed from the widget's settings)
and return table with two columns: DATUM_UTC_DT (date in UTC-0 zone) and DATUM_VALUE (value for that date) sorted ascending by DATUM_UTC_DT.