Use interval for ephemeral things
Problem
Using a dataset with ephemeral resources is taking a long time or using a lot of query credits.
Solution
Copy the resource dataset and modify it to be an Interval dataset instead by replacing make_resource with make_interval.
Explanation
In general, Resources should be used to model “things that last a long time and may change state”, such as hosts, containers, or customers. Intervals should be used to model “things that last a short period of time and do not change state”, such as user sessions, financial transactions, or API calls.
For example, you may want to model a customer request dataset where each customer request is made of a few events and only lasts for a few minutes. These requests can be modeled using the make_interval verb, which produces an interval dataset.
make interval options(expiry:10s), valid_from, valid_to
Note that older datasets may have used make_session to produce Interval datasets instead:
make_session
options(expiry:10s),
request_name:any_not_null(name),
request_tags:any_not_null(tags),
group_by(request_id)
Updated 25 days ago