---
updatedAt: 2025-12-05T18:41:41.000Z
agentTools:
  projectIndex: https://docs.observeinc.com/llms.txt
---

# make_event

Aliases: `changelog` (deprecated).

```
make_event [options(...)]?, [validFrom: col timestamp]?
```

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.

# 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. |

# Categories

* [Metadata](verb#metadata-verbs)

# 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

<OpalCodeBlock code={
`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.

<OpalCodeBlock code={
`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.

<OpalCodeBlock code={
`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.

<OpalCodeBlock code={
`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.