updated union function example
parent
bd8d853a97
commit
de2dd84640
|
|
@ -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])
|
||||
```
|
||||
|
|
|
|||
Loading…
Reference in New Issue