updated alignTime function to address PR feedback
parent
99ad8c4a94
commit
d31796c1e8
|
@ -11,7 +11,6 @@ weight: 302
|
||||||
|
|
||||||
The `experimental.alignTime()` function aligns input tables to a common start time.
|
The `experimental.alignTime()` function aligns input tables to a common start time.
|
||||||
|
|
||||||
|
|
||||||
_**Function type:** Transformation_
|
_**Function type:** Transformation_
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
@ -56,7 +55,10 @@ from(bucket: "example-bucket")
|
||||||
| 2020-02-03T00:00:00Z | 37.8 |
|
| 2020-02-03T00:00:00Z | 37.8 |
|
||||||
| 2020-02-04T00:00:00Z | 37.5 |
|
| 2020-02-04T00:00:00Z | 37.5 |
|
||||||
|
|
||||||
**The following functions output:**
|
**The following functions:**
|
||||||
|
|
||||||
|
1. Window data by calendar month creating two separate tables (one for January and one for February).
|
||||||
|
2. Align tables to `2020-01-01T00:00:00Z`.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
//...
|
//...
|
||||||
|
@ -64,6 +66,8 @@ from(bucket: "example-bucket")
|
||||||
|> alignTime(alignTo: 2020-01-01T00:00:00Z)
|
|> alignTime(alignTo: 2020-01-01T00:00:00Z)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**And output:**
|
||||||
|
|
||||||
{{< flex >}}
|
{{< flex >}}
|
||||||
{{% flex-content %}}
|
{{% flex-content %}}
|
||||||
| _time | _value |
|
| _time | _value |
|
||||||
|
@ -84,5 +88,5 @@ from(bucket: "example-bucket")
|
||||||
{{< /flex >}}
|
{{< /flex >}}
|
||||||
|
|
||||||
Each output table represents data from a calendar month.
|
Each output table represents data from a calendar month.
|
||||||
When visualized, timestamps are aligned to a common start time and values can be
|
When visualized, data is still grouped by month, but timestamps are aligned to a
|
||||||
compared in the time dimension.
|
common start time and values can be compared by time.
|
||||||
|
|
Loading…
Reference in New Issue