timewrap
timewrap interval: const duration, count: const int64, label_column: const string, [index_column: const string]?
Shifts the timestamps of rows ahead in time by the specified interval,
creating count parallel timeseries.
You must specify a name for the label column, which will contain a string
describing the shift, for example, "now", "1d ago", "2d ago", etc.
You may optionally specify index_column, in which case a column containing
the index of the shift (0, 1, ..., count - 1, where 0 means "now") is created.
If used with non-temporal verbs (exists, follow, etc.), timewrap
will return incomplete data.
Categories
Accelerable
timewrap 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
timewrap 1d, 4, "label"
Overlays data from today, 1 day ago, 2 days ago, and 3 days ago.
Creates a column named label that indicates which time series
the data belongs to.
timewrap 1d, 4, "label", "index"
Overlays data from today, 1 day ago, 2 days ago, and 3 days ago.
In addition to the label column, also creates a column named index
that indicates which time series the data belongs to
(0 for "today", 1 for "1 day ago", 3 for "3 days ago", etc.).
Updated about 16 hours ago