From faa43ab9e6381dce73daa1da385fb55816b9bd5c Mon Sep 17 00:00:00 2001 From: yfu Date: Thu, 11 Jul 2024 10:27:23 +1000 Subject: [PATCH 1/2] doc change for time format --- spiceaidocs/docs/reference/spicepod/datasets.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spiceaidocs/docs/reference/spicepod/datasets.md b/spiceaidocs/docs/reference/spicepod/datasets.md index 1bea92e6c..dabe24114 100644 --- a/spiceaidocs/docs/reference/spicepod/datasets.md +++ b/spiceaidocs/docs/reference/spicepod/datasets.md @@ -106,10 +106,14 @@ Required to enable a retention policy on the dataset. ## `time_format` Optional. The format of the `time_column`. The following values are supported: -- `unix_seconds` - Default. Unix timestamp in seconds. +- `timestamp` - Default. Timestamp without a timezone. +- `timestamptz` - Timestamp with a timezone. +- `unix_seconds` - Unix timestamp in seconds. - `unix_millis` - Unix timestamp in milliseconds. - `ISO8601` - [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. +Spice emits a warning if the `time_column` from the data source is incompatible with the `time_format` config. + :::warning[Limitations] - String-based columns are assumed to be ISO8601 format. ::: From 60a34b83b11b678177044de6f3e3948d1c5ff23c Mon Sep 17 00:00:00 2001 From: yfu Date: Fri, 12 Jul 2024 16:04:00 +1000 Subject: [PATCH 2/2] add example --- spiceaidocs/docs/reference/spicepod/datasets.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spiceaidocs/docs/reference/spicepod/datasets.md b/spiceaidocs/docs/reference/spicepod/datasets.md index dabe24114..3f50bbbc9 100644 --- a/spiceaidocs/docs/reference/spicepod/datasets.md +++ b/spiceaidocs/docs/reference/spicepod/datasets.md @@ -106,10 +106,10 @@ Required to enable a retention policy on the dataset. ## `time_format` Optional. The format of the `time_column`. The following values are supported: -- `timestamp` - Default. Timestamp without a timezone. -- `timestamptz` - Timestamp with a timezone. -- `unix_seconds` - Unix timestamp in seconds. -- `unix_millis` - Unix timestamp in milliseconds. +- `timestamp` - Default. Timestamp without a timezone. E.g. `2016-06-22 19:10:25` with data type `timestamp`. +- `timestamptz` - Timestamp with a timezone. E.g. `2016-06-22 19:10:25-07` with data type `timestamptz`. +- `unix_seconds` - Unix timestamp in seconds. E.g. `1718756687`. +- `unix_millis` - Unix timestamp in milliseconds. E.g. `1718756687000`. - `ISO8601` - [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Spice emits a warning if the `time_column` from the data source is incompatible with the `time_format` config.