Zum Hauptinhalt springen

StreamDataDownsamplingQueryOptions

Namespace: Meshmakers.Octo.Runtime.Contracts.StreamData

Options for a downsampling stream data query with time bins.

public class StreamDataDownsamplingQueryOptions : StreamDataQueryOptionsBase

Inheritance Object → StreamDataQueryOptionsBase → StreamDataDownsamplingQueryOptions

Properties​

AggregationColumns​

public IReadOnlyList<AggregationColumn> AggregationColumns { get; private set; }

Property Value​

IReadOnlyList<AggregationColumn>

GroupByColumnPaths​

Extra columns to group the downsampling result by, in addition to the time bin. Keeps interleaved series separated (e.g. one source rtId per series) so the result carries StreamDataQueryOptionsBase.Limit bins per series instead of merging every series into one bin. Null / empty ⇒ single-series grouping by the time bin only.

public IReadOnlyList<string> GroupByColumnPaths { get; private set; }

Property Value​

IReadOnlyList<String>

TimeZone​

IANA id of the time zone the bins are cut in, e.g. Europe/Vienna. Null together with StreamDataDownsamplingQueryOptions.BinOrigin and StreamDataDownsamplingQueryOptions.BinInterval null keeps the fixed-width UTC bins of earlier versions. Set (or a StreamDataDownsamplingQueryOptions.BinOrigin / StreamDataDownsamplingQueryOptions.BinInterval given), the bins are local calendar days of this zone (UTC when null): 23, 24 or 25 hours across DST changes, built with the same BucketBoundary logic as day rollups, so raw and rollup bins coincide.

public string TimeZone { get; private set; }

Property Value​

String

BinInterval​

Width of one bin in whole days. Null means one day when StreamDataDownsamplingQueryOptions.TimeZone or StreamDataDownsamplingQueryOptions.BinOrigin is set. Must be a whole number of days when a zone or origin is given. Weeks and months are served by calendar rollups, not here.

public Nullable<TimeSpan> BinInterval { get; private set; }

Property Value​

Nullable<TimeSpan>

BinOrigin​

Local time of day at which a bin starts, e.g. 06:00 for a gas day. A whole number of minutes in [00:00, 24:00); null means midnight. Same meaning as DayStartOffsetMs of a day rollup.

public Nullable<TimeSpan> BinOrigin { get; private set; }

Property Value​

Nullable<TimeSpan>

HasLocalDayBins​

True when the bins are local-day bins (a time zone, an origin or an interval is given) instead of the fixed-width UTC bins derived from range and StreamDataQueryOptionsBase.Limit.

public bool HasLocalDayBins { get; }

Property Value​

Boolean

CkTypeId​

public RtCkId<CkTypeId> CkTypeId { get; protected set; }

Property Value​

RtCkId<CkTypeId>

Columns​

public IReadOnlyList<string> Columns { get; protected set; }

Property Value​

IReadOnlyList<String>

RtIds​

public IReadOnlyList<OctoObjectId> RtIds { get; protected set; }

Property Value​

IReadOnlyList<OctoObjectId>

From​

public Nullable<DateTime> From { get; protected set; }

Property Value​

Nullable<DateTime>

To​

public Nullable<DateTime> To { get; protected set; }

Property Value​

Nullable<DateTime>

Limit​

public Nullable<int> Limit { get; protected set; }

Property Value​

Nullable<Int32>

SortOrders​

public IReadOnlyList<SortOrderItem> SortOrders { get; protected set; }

Property Value​

IReadOnlyList<SortOrderItem>

FieldFilters​

public IReadOnlyList<FieldFilter> FieldFilters { get; protected set; }

Property Value​

IReadOnlyList<FieldFilter>

Offset​

public Nullable<int> Offset { get; protected set; }

Property Value​

Nullable<Int32>

PageSize​

public Nullable<int> PageSize { get; protected set; }

Property Value​

Nullable<Int32>

Constructors​

StreamDataDownsamplingQueryOptions()​

public StreamDataDownsamplingQueryOptions()

Methods​

Create()​

public static StreamDataDownsamplingQueryOptions Create()

Returns​

StreamDataDownsamplingQueryOptions

WithCkTypeId(RtCkId<CkTypeId>)​

public StreamDataDownsamplingQueryOptions WithCkTypeId(RtCkId<CkTypeId> id)

Parameters​

id RtCkId<CkTypeId>

Returns​

StreamDataDownsamplingQueryOptions

WithAggregationColumns(IReadOnlyList<AggregationColumn>)​

public StreamDataDownsamplingQueryOptions WithAggregationColumns(IReadOnlyList<AggregationColumn> columns)

Parameters​

columns IReadOnlyList<AggregationColumn>

Returns​

StreamDataDownsamplingQueryOptions

WithGroupByColumns(IReadOnlyList<String>)​

public StreamDataDownsamplingQueryOptions WithGroupByColumns(IReadOnlyList<string> paths)

Parameters​

paths IReadOnlyList<String>

Returns​

StreamDataDownsamplingQueryOptions

WithBinInterval(Nullable<TimeSpan>)​

public StreamDataDownsamplingQueryOptions WithBinInterval(Nullable<TimeSpan> interval)

Parameters​

interval Nullable<TimeSpan>

Returns​

StreamDataDownsamplingQueryOptions

WithTimeZone(String)​

public StreamDataDownsamplingQueryOptions WithTimeZone(string timeZone)

Parameters​

timeZone String

Returns​

StreamDataDownsamplingQueryOptions

WithBinOrigin(Nullable<TimeSpan>)​

public StreamDataDownsamplingQueryOptions WithBinOrigin(Nullable<TimeSpan> origin)

Parameters​

origin Nullable<TimeSpan>

Returns​

StreamDataDownsamplingQueryOptions

WithTimeRange(Nullable<DateTime>, Nullable<DateTime>)​

public StreamDataDownsamplingQueryOptions WithTimeRange(Nullable<DateTime> from, Nullable<DateTime> to)

Parameters​

from Nullable<DateTime>

to Nullable<DateTime>

Returns​

StreamDataDownsamplingQueryOptions

WithLimit(Nullable<Int32>)​

public StreamDataDownsamplingQueryOptions WithLimit(Nullable<int> limit)

Parameters​

limit Nullable<Int32>

Returns​

StreamDataDownsamplingQueryOptions

WithFieldFilters(IReadOnlyList<FieldFilter>)​

public StreamDataDownsamplingQueryOptions WithFieldFilters(IReadOnlyList<FieldFilter> fieldFilters)

Parameters​

fieldFilters IReadOnlyList<FieldFilter>

Returns​

StreamDataDownsamplingQueryOptions

WithRtIds(IReadOnlyList<OctoObjectId>)​

public StreamDataDownsamplingQueryOptions WithRtIds(IReadOnlyList<OctoObjectId> ids)

Parameters​

ids IReadOnlyList<OctoObjectId>

Returns​

StreamDataDownsamplingQueryOptions

WithPagination(Nullable<Int32>, Nullable<Int32>)​

public StreamDataDownsamplingQueryOptions WithPagination(Nullable<int> offset, Nullable<int> pageSize)

Parameters​

offset Nullable<Int32>

pageSize Nullable<Int32>

Returns​

StreamDataDownsamplingQueryOptions