Schemas
TsFamilyForecastQuery
A timeseries family written out in full: where its rows come from, plus what its columns mean.
targetsThe columns to forecast. Omit to forecast every column the schema
declares with the "target" kind.
Selector for materializing a subset of a timeseries family. If omitted, every timeseries will be forecasted.
An object with one entry per dimension, keyed by the level to forecast that
dimension at: "city" takes the geography dimension at its city level,
aggregating the finer levels below it. Each value is a pattern, narrowing
which of that level's values to take:
"any"selects every value at that level.[value, ...]selects concrete values.{ "from": value?, "to": value? }selects a bounded or half-bounded range.
A dimension with no entry is aggregated over entirely.
{}quantilesQuantile levels to forecast for every target, as numbers in
[0, 1]; include "mean" to also request the mean. Omit for a
default spread.
compute_metricsScore the forecast against the actuals the request carries, and
report the scores under metrics in the response. A cutoff is
scored only when its whole forecast window is present and non-null
for every target. Some of the scores are computed on the mean, so
when this is set the mean is forecasted whether or not quantiles
asks for it.
A non-empty array of information cutoffs. For example ["latest"], an
explicit date ["2025-01-31"], or a recurring schedule [{ "every": "3d" }].
["latest"]Gap held before the forecast starts, on top of the step separating the information cutoff from the first prediction's target time.
How much history to feed the model before the information cutoff.
Total time window forecasted, measured from the end of the lead time.
Target-time interval covered by each forecasted value (e.g. a span of
1d produces daily predictions, 3d produces 3-day buckets).
TimeseriesFamilySchema
Where the timeseries family's rows come from.
The timeseries family's columns, keyed by name. Exactly one declares
kind: "time".
has_gapsWhether rows may be missing from the grid. false, the default,
asserts the rows are complete and reports the first gap as an error.
true completes the grid and lets series start late, then fills the
rows it added the way each column says to: a column with an impute
rule gets that rule's value, and a column without one is left null.
Roll-up paths, keyed by the name you give each one.
Other timeseries families to attach, each contributing extra variables.
nameA name for the timeseries family, for your own reference.
descriptionWhat the timeseries family holds, for your own reference.
metadataAnything you want to keep alongside the timeseries family. It is stored as written and plays no part in the forecast.
Column
Decision Table
| Variant | Matching Criteria |
|---|---|
| No specific criteria | |
| No specific criteria |
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = string | |
| type = string | |
| type = string | |
| type = string |
BareKind
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = string | |
| type = string | |
| type = string | |
| type = string |
FullColumn
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = object · requires: kind | |
| type = object · requires: kind | |
| type = object · requires: kind | |
| type = object · requires: kind | |
| type = object · requires: kind | |
| type = object · requires: kind |
kindtypeType of the column's values. Omit it and the type is read from the data; a type given here wins.
columnColumn to read in the source data, when it differs from the name this
declaration sits under. Cannot be combined with virtual.
virtualExpression computing the column instead of reading it from the source.
Cannot be combined with column. Not supported yet: a request
declaring it is rejected.
descriptionWhat the column means, for your own reference.
Type
A value type: bool, int32, int64, float32, float64, string,
date32, or timestamp_us. Wrap one in nullable<...> to allow
missing values, or in list<...> for a column of lists.
Expr
An expression: an aggregation (sum, mean, avg, min, max), a
literal (0, 1.5, true), or a comma-separated tuple of those in
parentheses.
Known
Decision Table
| Variant | Matching Criteria |
|---|---|
| No specific criteria | |
| type = object · requires: at |
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = string | |
| type = string |
KnownTime
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = string | |
| type = string |
KnownAt
atWhen the value becomes observable, as an expression over the time column.
Aggregate
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = string | |
| type = object · requires: expr |
AggregateTable
exprHow the values combine.
completeRoll-up paths whose levels have to be complete first: every level a row could exist at is filled in before the values combine.
imputedWhether filled-in values feed the aggregation as well as recorded ones.
Defaults to false.
Impute
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = object · requires: const | |
| type = object · requires: locf | |
| type = object · requires: locb | |
| type = object · requires: rolling |
constThe value to fill with. A string keeps its own quotation marks inside the JSON string, as the examples show, and there is no null: to leave gaps empty, omit the rule instead.
GapFill
max_gapLongest run of consecutive missing values to fill, counted in grid steps. Omit it to fill runs of any length.
Rolling
Which statistic to compute.
sizeHow many grid steps the window spans. A centred window needs an odd number, so it has as many steps on each side.
Where the window sits relative to the value being filled. Defaults to
trailing. centered needs an odd size.
RollingStat
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = string | |
| type = string | |
| type = string | |
| type = string |
RollingAlignment
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = string | |
| type = string | |
| type = string |
Interpolate
Decision Table
| Variant | Matching Criteria |
|---|---|
| No specific criteria | |
| type = object · requires: proportional_by |
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = string | |
| type = string |
InterpolateName
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = string | |
| type = string |
ProportionalBy
proportional_byColumn whose values weight the split.
Rule
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = object · requires: at, impute | |
| type = object · requires: from, to |
atLevels this rule applies at.
How the missing values are filled there.
ImputeRule
atLevels this rule applies at.
How the missing values are filled there.
RankPattern
Which levels a rule applies to: * for every level of every roll-up path,
or a comma-separated list of clauses, one per path. A clause compares a
path's level with =, >=, <=, >, or <, where the coarser level is
the greater one, and its right-hand side is a level name, * for any
level, or absent for rows not broken down by that path at all.
TransitionRule
fromLevels the values are read at.
toLevels the values are produced at.
How the values combine, when to is the coarser side.
How the values are spread out, when to is the finer side.
Interval
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = string | |
| type = object |
The spacing written as one string.
IntervalString
An interval written as one string: a name (daily, weekly, 5min),
space-separated terms (1d 3h), or an ISO 8601 duration (P1Y2M10D).
Names are case-insensitive and accept the singular, the plural, and the
adjective (day, days, daily).
IntervalParts
yearsWhole years.
monthsWhole months.
daysWhole days.
hoursWhole hours.
minutesWhole minutes.
secondsWhole seconds.
msWhole milliseconds.
usWhole microseconds.
Anchor
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = string | |
| type = object |
A weekday, which anchors weekly grids; a month, which anchors yearly ones; or the date or timestamp the grid starts at.
Partition
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = string | |
| type = object |
The grid's spacing on its own.
Chain
One roll-up path: identifier columns from finest to coarsest. At least one column.
{"0": "store", "1": "city", "2": "country"}Source
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = object · requires: inline | |
| type = object · requires: uri | |
| type = object · requires: parquet |
The rows themselves, one array of values per column name. Every array has the same length, and each position across them is one row.
{
"time": ["2020-01-01", "2020-01-02", "2020-01-03"],
"sales": [12, 9, 15]
}{
"time": ["2020-01-01", "2020-01-01", "2020-01-02", "2020-01-02"],
"store": ["north", "south", "north", "south"],
"sales": [12, 7, 9, 11],
"on_promotion": [false, false, true, false]
}Scalar
A single value: a number, a boolean, a string, or null for a missing observation. A JSON document may write null; a TOML one has no form for it.
ParquetPaths
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = string | |
| type = array |
One file, or a glob matching several.
Covariate
The attached timeseries family, written out here or pointed at elsewhere.
Which columns to match rows on. An empty list matches every attached row to every row of this timeseries family. Omit it and the request is rejected: spell the pairs out.
onlyWhich of the attached timeseries family's variables to keep, by the name they carry there. Omit it to keep all of them.
Names to give the kept variables, keyed by the name they carry on the attached timeseries family.
VersionedSchema
versionWhich schema format this document is written in.
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = object · requires: columns, source, version | |
| type = object · requires: ref, version | |
| type = object · requires: version | |
| type = object · requires: version |
Where the timeseries family's rows come from.
The timeseries family's columns, keyed by name. Exactly one declares
kind: "time".
versionWhich schema format this document is written in.
has_gapsWhether rows may be missing from the grid. false, the default,
asserts the rows are complete and reports the first gap as an error.
true completes the grid and lets series start late, then fills the
rows it added the way each column says to: a column with an impute
rule gets that rule's value, and a column without one is left null.
Roll-up paths, keyed by the name you give each one.
Other timeseries families to attach, each contributing extra variables.
nameA name for the timeseries family, for your own reference.
descriptionWhat the timeseries family holds, for your own reference.
metadataAnything you want to keep alongside the timeseries family. It is stored as written and plays no part in the forecast.
SchemaUri
Where another schema document lives: a timetrove://org/name reference, or
a path to a schema file relative to the document naming it.
OnPair
baseColumn on the timeseries family the covariate is attached to.
attachedColumn on the attached timeseries family.
Selector
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = string | |
| type = array | |
| type = object |
SelectorPattern
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = string | |
| type = array | |
| type = object |
SelectorRange
fromLower bound of the range; omit for an open lower end.
toUpper bound of the range; omit for an open upper end.
Quantile
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = number | |
| type = string |
InformationCutoffDatetimes
A non-empty array of information cutoffs. For example ["latest"], an
explicit date ["2025-01-31"], or a recurring schedule [{ "every": "3d" }].
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = string | |
| type = string | |
| type = object · requires: every |
InformationCutoffDatetime
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = string | |
| type = string | |
| type = object · requires: every |
LatestStr
The literal string "latest": use the most recent point at which the
target is observed as the information cutoff.
Datetime
^\d{4}-\d{2}-\d{2}([…RecurringCutoff
A forecast-geometry interval: either a whole number of the series' native
frequency steps, or a [CalendarInterval] — never both.
RelativeInterval
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = integer | |
| type = string |
A whole number of native frequency steps (e.g. 3).
CalendarInterval
A calendar interval: an ISO 8601 duration (P1Y2M10D, PT1H30M), a named interval (daily, 5min), or space-separated terms (1d 3h).
Leadtime
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = integer | |
| type = string |
A whole number of native frequency steps (e.g. 3).
Context
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = integer | |
| type = string |
A whole number of native frequency steps (e.g. 3).
Horizon
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = integer | |
| type = string |
A whole number of native frequency steps (e.g. 3).
Span
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = integer | |
| type = string |
A whole number of native frequency steps (e.g. 3).
ForecastTaskResponse
Long-format forecast dataframe: one row per (cutoff, horizon step).
Accuracy metrics, one entry per series whose actuals cover a whole
forecast window. Present only when the request set compute_metrics.
ResponseDataFrame
timeTarget time of the prediction: one step past cutoff, plus lead_time.
Information cutoff the prediction was made from, the last instant it saw.
lead_timespanThe dimensional columns — every identifier column declared by the schema (including hierarchy ancestors), keyed by source column name.
The targets
ColumnarData
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = array | |
| type = array | |
| type = array | |
| type = array | |
| type = array | |
| type = array |
SeriesMetrics
The series' identifier values, as the response dataframe's identifiers
columns carry them.
IdentifierValue
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = null | |
| type = string | |
| type = integer |
Metrics
crpsscaled_crpscrps divided by the mean absolute actual over the scored windows.
maemapeMean absolute percentage error as a fraction, not a percentage.
wapemae divided by the mean absolute actual over the scored windows.
scaled_biasMean signed error, prediction - actual, divided by the mean absolute
actual over the scored windows: negative when the forecast runs low.

