Time Series Database Cache Module by Automation Professionals
E-Mail Support

system.dataset.mergeTimeSeries

Combine multiple datasets of time series data into a single dataset. Duplicate rows are discarded and the final dataset contains all of the unique timestamps from all of the supplied datasets. The final column list is taken from the first dataset given. Optionally filter the rows by starting vs. ending timestamps. Available in all scopes.

Syntax

mergeTimeSeries([begints, endts,] [gapTolerance,] datasets...) returns Dataset

ArgumentData TypeDescription
begintsDateOptional filter starting timestamp.
endtsDateFilter ending timestamp. Required when begints is present.
gapToleranceLongOptional, Milliseconds. Insert a null row when consecutive timestamps are further apart than this tolerance.
datasetsDataset[]List of Datasets, in order of priority. The first Dataset's column definitions will set the result columns. All datasets must have timestamps in their first column (the "Date" data type). The datasets' other columns are matched by name, not by position within the dataset.

Usage Notes

This scripting function has the same underlying implementation as the matching expression function. The only difference is that this function expects the datasets to be supplied in a python list, where the expression function takes a variable number of arguments instead.