Skip to content

Commit 4e530f5

Browse files
docs: Update types-and-formats.mdx (#8382) — thank you, @morgan-at-cube!
Explicitly state that dates should be cast to timestamp.
1 parent 3acc7a7 commit 4e530f5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docs/pages/reference/data-model/types-and-formats.mdx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -573,10 +573,12 @@ This section describes the various types that can be assigned to a
573573
### `time`
574574

575575
In order to be able to work with time series data, Cube needs to identify
576-
time dimension which is a timestamp column in your database. You can define
576+
a time dimension which is a timestamp column in your database. You can define
577577
several time dimensions in a single cube.
578578

579-
Note that type of target column should be `TIMESTAMP`. Please see
579+
Note that the type of the target column should be `TIMESTAMP`.
580+
If your time-based column is type `DATE` or another temporal type,
581+
you should cast it to a timestamp in the `sql` parameter of the dimension. Please see
580582
[this recipe][ref-string-time-dims] if your datetime information is stored
581583
as a string.
582584

@@ -954,4 +956,4 @@ cubes:
954956
/reference/data-model/pre-aggregations#rollup
955957
[ref-schema-ref-calc-measures]:
956958
/reference/data-model/measures#calculated-measures
957-
[ref-drilldowns]: /guides/recipes/data-exploration/drilldowns
959+
[ref-drilldowns]: /guides/recipes/data-exploration/drilldowns

0 commit comments

Comments
 (0)