make_event

Type of operation: Metadata

Description

Creates an Event dataset from an input Table, Interval, or Resource dataset. When the verb input is a Table dataset, make_event requires the name of the new Valid From column, and will filter results to be within the query window. When the verb input is an Interval or Resource dataset, make_event takes no arguments. For Interval datasets, make_event produces events occurring at the start times (Valid From) of the intervals by default. The option use_valid_to is valid only on Interval datasets and, when true, indicates that the output events should instead occur at the end times (Valid To) of the input intervals. For Resource datasets, make_event demotes each resource to the series of update events which would create it.

Usage

make_event [ options ], [ validFrom ]

Argument

Type

Optional

Repeatable

Restrictions

options

options

yes

no

constant

validFrom

timestamp

yes

no

column

Options

Option

Type

Meaning

use_valid_to

bool

When true and the input is an Interval dataset, use the input’s Valid To field as the output’s Valid From field.

Accelerable

make_event 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_event

Where the input is a Resource dataset, create an Event dataset based on its resources. For each state change of a resource in the input, make_event emits a row describing that new state. The Valid From value is the time the state change occurred. The output dataset retains most metadata from the input dataset, including any primary keys.

make_event

For an Interval dataset input, create an Event dataset containing one event for each interval. The timestamp column of the output is the “Valid From” column of the input. In other words, produces events that occur at the start times of the input intervals.

make_event options(use_valid_to:true)

For an Interval dataset input, create an Event dataset containing one event for each interval. The timestamp column of the output is the “Valid To” column of the input. In other words, produces events that occur at the end times of the input intervals.

make_event vf

Creates an Event dataset from the input Table dataset, using ‘vf’ as the new Valid From column. The output will be filtered to only include rows within the query window.

Aliases

  • changelog (deprecated)