updated alignTime function to address PR feedback

pull/908/head
Scott Anderson 2020-04-03 12:03:41 -06:00
parent 99ad8c4a94
commit d31796c1e8
1 changed files with 8 additions and 4 deletions

View File

@ -11,7 +11,6 @@ weight: 302
The `experimental.alignTime()` function aligns input tables to a common start time.
_**Function type:** Transformation_
```js
@ -56,7 +55,10 @@ from(bucket: "example-bucket")
| 2020-02-03T00:00:00Z | 37.8 |
| 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
//...
@ -64,6 +66,8 @@ from(bucket: "example-bucket")
|> alignTime(alignTo: 2020-01-01T00:00:00Z)
```
**And output:**
{{< flex >}}
{{% flex-content %}}
| _time | _value |
@ -84,5 +88,5 @@ from(bucket: "example-bucket")
{{< /flex >}}
Each output table represents data from a calendar month.
When visualized, timestamps are aligned to a common start time and values can be
compared in the time dimension.
When visualized, data is still grouped by month, but timestamps are aligned to a
common start time and values can be compared by time.