updated union function example

pull/503/head
Scott Anderson 2019-10-02 09:35:20 -07:00
parent bd8d853a97
commit de2dd84640
1 changed files with 5 additions and 5 deletions

View File

@ -35,13 +35,13 @@ _**Data type:** Array of streams_
## Examples
```js
left = from(bucket: "example-bucket")
|> range(start: 2018-05-22T19:53:00Z, stop: 2018-05-22T19:53:50Z)
bucket1 = from(bucket: "example-bucket-1")
|> range(start: -5m)
|> filter(fn: (r) => r._field == "usage_guest" or r._field == "usage_guest_nice")
right = from(bucket: "example-bucket")
|> range(start: 2018-05-22T19:53:50Z, stop: 2018-05-22T19:54:20Z)
bucket2 = from(bucket: "example-bucket-2")
|> range(start: -5m)
|> filter(fn: (r) => r._field == "usage_guest" or r._field == "usage_idle")
union(tables: [left, right])
union(tables: [bucket1, bucket2])
```