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

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. Optionally insert null rows where timestamps are discontinuous. 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...One or more Dataset arguments, 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.