extensions
tidepool's own settings in the model are custom_extensions entries with vendor_name: TIDEPOOL. Their data is a JSON document in a string:
yaml
# fragment
custom_extensions:
- vendor_name: TIDEPOOL
data: '{"kind": "derived"}'Each part of the model can have one. An unknown key in data is an error.
metrics
What a metric's Tidepool extension may say.
| key | type | default | description |
|---|---|---|---|
format | string | How the value shows: a style (int, decimal, percent or currency:XXX), compact and decimals:N, in any order: currency:EUR compact. A visual can set a different format. | |
ignore_selection | list of string | Evaluate as if these fields (dataset.field, or * for all) had no selection. | |
kind | MetricKind | derived: the expression is over other metrics, evaluated after aggregation (e.g. revenue / order_count). | |
table | string | The dataset rows are counted on, for expressions that don't name one (COUNT(*)). | |
time_field | string | ||
time_offset | string | Evaluate with the time selection on time_field shifted, e.g. -1y. | |
time_window | string | Evaluate over a window of time_field in place of its selection: ytd, qtd, mtd, wtd (to date), or last:<n><unit> with unit min, h, d, w, mo, q or y (last:12mo). It ends where the time selection ends, or with the current period; in a visual grouped by time_field, each group's window ends where the group does (a running year to date, a rolling 12 months). | |
total | list of string | Compute it without these of a visual's dimensions (dataset.field, or * for all of them), its value repeated across them: the denominator of a share of total (revenue / revenue_total). The selection still applies; a field the visual doesn't group by does nothing. |
MetricKind
Type: derived.
datasets
What a dataset's Tidepool extension may say.
| key | type | default | description |
|---|---|---|---|
hierarchy | HierarchyExtension | A parent–child hierarchy over the dataset's rows (plan §5.6). |
HierarchyExtension
A parent–child hierarchy: each row is a node, keyed by the table's (single-column) primary key, and parent holds its parent's key. The tree may be ragged: nodes are at whatever depth their parents put them.
| key | type | default | description |
|---|---|---|---|
kind | string | A column saying what a node is (site, line, device…), shown beside it. | |
label | string | The column a node is shown by; the key when absent. | |
name | string | required | The field the hierarchy adds to the dataset; its values are node keys. |
parent | string | required | The column holding a node's parent's key; NULL for a root. |
fields
What a field's Tidepool extension may say.
| key | type | default | description |
|---|---|---|---|
grain | list of TimeGrain | For time fields: the grains a visual may group by. |
TimeGrain
One of:
day·week·month·quarter·yearminute: Timestamps only.hour: Timestamps only.
relationships
What a relationship's Tidepool extension may say.
| key | type | default | description |
|---|---|---|---|
role | string | Distinguishes relationships that connect the same pair of tables (order date vs ship date). |
the model
What the model's own Tidepool extension may say.
| key | type | default | description |
|---|---|---|---|
filter_direction | FilterDirection |
FilterDirection
| value | description |
|---|---|
one_to_many | Selections flow from the one side to the many side (plan D5): a selected region filters orders, a selected order status doesn't filter customers. The default. |
both | Selections flow both ways (plan §5.4): a selected order status also narrows customers to those with such orders, and everything associated with them. Relationships may not form a loop. |