make_interval

Type of operation: Metadata

Description

Creates an Interval dataset from an input Table, Event, or Resource dataset.

When the verb input is a Table dataset, make_interval requires the name of the new Valid From and Valid To columns, and will filter results to be within the query window. When the verb input is an Event dataset, make_interval requires the name of the new Valid To column.

Note that the max_time_diff option is treated as an upper bound of the length of the output intervals. The default max_time_diff is one hour. Beware that intervals with a longer duration than max_time_diff may not appear in the output. When converting from a Resource to an Interval dataset, ensure that max_time_diff is larger than the lifetimes of the individual states of each resource.

Usage

make_interval [ options ], [ validFrom ], [ validTo ]

Argument

Type

Optional

Repeatable

Restrictions

options

options

yes

no

constant

validFrom

timestamp

yes

no

column

validTo

timestamp

yes

no

column

Options

Option

Type

Meaning

max_time_diff

duration

If you specify a timestamp field that is different from the input timestamp, the value in the new field will be no further away from the old timestamp than this (default 1h)

Accelerable

make_interval is always accelerable if the input is accelerable. A dataset that only uses accelerable verbs can be accelerated, making queries on the dataset respond faster.

Examples

make_interval vt

Creates an Interval dataset from the input Event dataset, using the same Valid From column as the input and using ‘vt’ as the new Valid To column.

make_interval vf, vt

Creates an Interval dataset from the input Table dataset, using ‘vf’ as the new Valid From column and ‘vt’ as the new Valid To column. The output will be filtered to only include rows which overlap with the query window.

make_interval options(max_time_diff:24h)

Creates an Interval dataset from the input Resource dataset, where each discrete resource state is a separate interval. Any resource states longer than 24 hours are not guaranteed to appear in the output.