From 00f1066d3e67dd9f2bd7cc32158a599ff8f25913 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Wed, 19 Aug 2020 10:10:17 -0600 Subject: [PATCH] updated integer usage on range --- .../stdlib/built-in/transformations/range.md | 25 ++++++++++++------- .../flux/stdlib/contrib/influxdb/select.md | 10 +++----- .../stdlib/experimental/query/fromrange.md | 10 +++----- .../stdlib/experimental/query/inbucket.md | 10 +++----- .../reference/flux/stdlib/monitor/from.md | 10 +++----- .../reference/flux/stdlib/monitor/logs.md | 10 +++----- 6 files changed, 36 insertions(+), 39 deletions(-) diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/range.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/range.md index 70360537f..dbb0e85a7 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/range.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/range.md @@ -31,21 +31,21 @@ range(start: -15m, stop: now()) ### start The earliest time to include in results. Results **include** points that match the specified start time. -Use a relative duration or absolute time. -For example, `-1h` or `2019-08-28T22:00:00Z`. +Use a relative duration, absolute time, or integer (Unix timestamp in seconds). +For example, `-1h`, `2019-08-28T22:00:00Z`, or `1567029600`. Durations are relative to `now()`. -_**Data type:** Duration | Time_ +_**Data type:** Duration | Time | Integer_ ### stop The latest time to include in results. Results **exclude** points that match the specified stop time. -Use a relative duration or absolute time. -For example, `-1h` or `2019-08-28T22:00:00Z`. +Use a relative duration, absolute time, or integer (Unix timestamp in seconds). +For example, `-1h`, `2019-08-28T22:00:00Z`, or `1567029600`. Durations are relative to `now()`. Defaults to `now()`. -_**Data type:** Duration | Time_ +_**Data type:** Duration | Time | Integer_ {{% note %}} Time values in Flux must be in [RFC3339 format](/v2.0/reference/flux/language/types#timestamp-format). @@ -56,20 +56,27 @@ Time values in Flux must be in [RFC3339 format](/v2.0/reference/flux/language/ty ###### Time range relative to now ```js from(bucket:"example-bucket") - |> range(start:-12h) + |> range(start: -12h) // ... ``` ###### Relative time range ```js from(bucket:"example-bucket") - |> range(start:-12h, stop: -15m) + |> range(start: -12h, stop: -15m) // ... ``` ###### Absolute time range ```js from(bucket:"example-bucket") - |> range(start:2018-05-22T23:30:00Z, stop: 2018-05-23T00:00:00Z) + |> range(start: 2018-05-22T23:30:00Z, stop: 2018-05-23T00:00:00Z) + // ... +``` + +###### Absolute time range with Unix timestamps +```js +from(bucket:"example-bucket") + |> range(start: 1527031800, stop: 1527033600) // ... ``` diff --git a/content/v2.0/reference/flux/stdlib/contrib/influxdb/select.md b/content/v2.0/reference/flux/stdlib/contrib/influxdb/select.md index cac8ebccd..fea470ef5 100644 --- a/content/v2.0/reference/flux/stdlib/contrib/influxdb/select.md +++ b/content/v2.0/reference/flux/stdlib/contrib/influxdb/select.md @@ -55,19 +55,17 @@ _**Data type:** String_ ### start Required Earliest time to include in results. Results **include** points that match the specified start time. -Use a relative duration or absolute time. -For example, `-1h` or `2019-08-28T22:00:00Z`. +Use a relative duration, absolute time, or integer (Unix timestamp in seconds). +For example, `-1h`, `2019-08-28T22:00:00Z`, or `1567029600`. Durations are relative to `now()`. -Integers are nanosecond Unix timestamps. _**Data type:** Duration | Time | Integer_ ### stop Latest time to include in results. Results **exclude** points that match the specified stop time. -Use a relative duration or absolute time. -For example, `-1h` or `2019-08-28T22:00:00Z`. -Integers are nanosecond Unix timestamps. +Use a relative duration, absolute time, or integer (Unix timestamp in seconds). +For example, `-1h`, `2019-08-28T22:00:00Z`, or `1567029600`. Durations are relative to `now()`. Defaults to `now()`. diff --git a/content/v2.0/reference/flux/stdlib/experimental/query/fromrange.md b/content/v2.0/reference/flux/stdlib/experimental/query/fromrange.md index c7a12881b..7b6ab33a2 100644 --- a/content/v2.0/reference/flux/stdlib/experimental/query/fromrange.md +++ b/content/v2.0/reference/flux/stdlib/experimental/query/fromrange.md @@ -35,20 +35,18 @@ _**Data type:** String_ ### start The earliest time to include in results. Results **include** points that match the specified start time. -Use a relative duration or absolute time. -For example, `-1h` or `2019-08-28T22:00:00Z`. +Use a relative duration, absolute time, or integer (Unix timestamp in seconds). +For example, `-1h`, `2019-08-28T22:00:00Z`, or `1567029600`.. Durations are relative to `now()`. -Integers are nanosecond Unix timestamps. _**Data type:** Duration | Time | Integer_ ### stop The latest time to include in results. Results **exclude** points that match the specified stop time. -Use a relative duration or absolute time. -For example, `-1h` or `2019-08-28T22:00:00Z`. +Use a relative duration, absolute time, or integer (Unix timestamp in seconds). +For example, `-1h`, `2019-08-28T22:00:00Z`, or `1567029600`. Durations are relative to `now()`. -Integers are nanosecond Unix timestamps. Defaults to `now()`. _**Data type:** Duration | Time | Integer_ diff --git a/content/v2.0/reference/flux/stdlib/experimental/query/inbucket.md b/content/v2.0/reference/flux/stdlib/experimental/query/inbucket.md index 4690e5a4b..9d401b11d 100644 --- a/content/v2.0/reference/flux/stdlib/experimental/query/inbucket.md +++ b/content/v2.0/reference/flux/stdlib/experimental/query/inbucket.md @@ -38,20 +38,18 @@ _**Data type:** String_ ### start The earliest time to include in results. Results **include** points that match the specified start time. -Use a relative duration or absolute time. -For example, `-1h` or `2019-08-28T22:00:00Z`. +Use a relative duration, absolute time, or integer (Unix timestamp in seconds). +For example, `-1h`, `2019-08-28T22:00:00Z`, or `1567029600`. Durations are relative to `now()`. -Integers are nanosecond Unix timestamps. _**Data type:** Duration | Time | Integer_ ### stop The latest time to include in results. Results **exclude** points that match the specified stop time. -Use a relative duration or absolute time. -For example, `-1h` or `2019-08-28T22:00:00Z`. +Use a relative duration, absolute time, or integer (Unix timestamp in seconds). +For example, `-1h`, `2019-08-28T22:00:00Z`, or `1567029600`. Durations are relative to `now()`. -Integers are nanosecond Unix timestamps. Defaults to `now()`. _**Data type:** Duration | Time | Integer_ diff --git a/content/v2.0/reference/flux/stdlib/monitor/from.md b/content/v2.0/reference/flux/stdlib/monitor/from.md index 9186d7ac4..d98924aec 100644 --- a/content/v2.0/reference/flux/stdlib/monitor/from.md +++ b/content/v2.0/reference/flux/stdlib/monitor/from.md @@ -32,19 +32,17 @@ monitor.from( ### start The earliest time to include in results. -Use a relative duration or absolute time. -For example, `-1h` or `2019-08-28T22:00:00Z`. +Use a relative duration, absolute time, or integer (Unix timestamp in seconds). +For example, `-1h`, `2019-08-28T22:00:00Z`, or `1567029600`. Durations are relative to `now()`. -Integers are nanosecond Unix timestamps. _**Data type:** Duration | Time | Integer_ ### stop The latest time to include in results. -Use a relative duration or absolute time. -For example, `-1h` or `2019-08-28T22:00:00Z`. +Use a relative duration, absolute time, or integer (Unix timestamp in seconds). +For example, `-1h`, `2019-08-28T22:00:00Z`, or `1567029600`. Durations are relative to `now()`. -Integers are nanosecond Unix timestamps. Defaults to `now()`. _**Data type:** Duration | Time | Integer_ diff --git a/content/v2.0/reference/flux/stdlib/monitor/logs.md b/content/v2.0/reference/flux/stdlib/monitor/logs.md index 35d3d0b59..ce46ec429 100644 --- a/content/v2.0/reference/flux/stdlib/monitor/logs.md +++ b/content/v2.0/reference/flux/stdlib/monitor/logs.md @@ -31,19 +31,17 @@ monitor.logs( ### start The earliest time to include in results. -Use a relative duration or absolute time. -For example, `-1h` or `2019-08-28T22:00:00Z`. +Use a relative duration, absolute time, or integer (Unix timestamp in seconds). +For example, `-1h`, `2019-08-28T22:00:00Z`, or `1567029600`. Durations are relative to `now()`. -Integers are nanosecond Unix timestamps. _**Data type:** Duration | Time | Integer_ ### stop The latest time to include in results. -Use a relative duration or absolute time. -For example, `-1h` or `2019-08-28T22:00:00Z`. +Use a relative duration, absolute time, or integer (Unix timestamp in seconds). +For example, `-1h`, `2019-08-28T22:00:00Z`, or `1567029600`. Durations are relative to `now()`. -Integers are nanosecond Unix timestamps. Defaults to `now()`. _**Data type:** Duration | Time | Integer_