hotfix: restore old join examples for previous influxdb versions
parent
025f8769e9
commit
9f6e0dc26e
|
|
@ -10,8 +10,14 @@ menu:
|
|||
parent: Query with Flux
|
||||
weight: 210
|
||||
related:
|
||||
- /{{< latest "flux" >}}/stdlib/universe/join
|
||||
list_query_example: join
|
||||
- /{{< latest "flux" >}}/join-data/
|
||||
- /{{< latest "flux" >}}/join-data/inner/
|
||||
- /{{< latest "flux" >}}/join-data/left-outer/
|
||||
- /{{< latest "flux" >}}/join-data/right-outer/
|
||||
- /{{< latest "flux" >}}/join-data/full-outer/
|
||||
- /{{< latest "flux" >}}/join-data/time/
|
||||
- /{{< latest "flux" >}}/stdlib/join/
|
||||
list_query_example: join-new
|
||||
---
|
||||
|
||||
{{< duplicate-oss >}}
|
||||
|
|
@ -18,7 +18,8 @@ related:
|
|||
- /{{< latest "flux" >}}/join-data/right-outer/
|
||||
- /{{< latest "flux" >}}/join-data/full-outer/
|
||||
- /{{< latest "flux" >}}/join-data/time/
|
||||
list_query_example: join
|
||||
- /{{< latest "flux" >}}/stdlib/join/
|
||||
list_query_example: join-new
|
||||
---
|
||||
|
||||
Use the Flux [`join` package](/{{< latest "flux" >}}/stdlib/join/) to join two data sets
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ interpolate_linear:
|
|||
| 2021-01-08T00:00:00Z | 80.0 |
|
||||
| 2021-01-09T00:00:00Z | 90.0 |
|
||||
|
||||
join:
|
||||
join-new:
|
||||
-
|
||||
code: |
|
||||
```js
|
||||
|
|
@ -302,6 +302,43 @@ join:
|
|||
| 2020-01-01T00:03:00Z | 5678 | 1 | true |
|
||||
| 2020-01-01T00:04:00Z | 5678 | 8 | true |
|
||||
|
||||
join:
|
||||
-
|
||||
code: |
|
||||
```js
|
||||
t1 = from(bucket: "example-bucket")
|
||||
|> range(start: 2020-01-01T00:00:00Z)
|
||||
|> filter(fn: (r) => r.m == "foo")
|
||||
|
||||
t2 = from(bucket: "example-bucket")
|
||||
|> range(start: 2020-01-01T00:00:00Z)
|
||||
|> filter(fn: (r) => r.m == "bar")
|
||||
|
||||
join(tables: {t1: t1, t2: t2}, on: ["_time"])
|
||||
```
|
||||
input: |
|
||||
###### t1
|
||||
| _time | _value |
|
||||
|:----- | ------:|
|
||||
| 2020-01-01T00:01:00Z | 1 |
|
||||
| 2020-01-01T00:02:00Z | 2 |
|
||||
| 2020-01-01T00:03:00Z | 1 |
|
||||
| 2020-01-01T00:04:00Z | 3 |
|
||||
###### t2
|
||||
| _time | _value |
|
||||
|:----- | ------:|
|
||||
| 2020-01-01T00:01:00Z | 5 |
|
||||
| 2020-01-01T00:02:00Z | 2 |
|
||||
| 2020-01-01T00:03:00Z | 3 |
|
||||
| 2020-01-01T00:04:00Z | 4 |
|
||||
output: |
|
||||
| _time | _value_t1 | _value_t2 |
|
||||
|:----- | ---------:| ---------:|
|
||||
| 2020-01-01T00:01:00Z | 1 | 5 |
|
||||
| 2020-01-01T00:02:00Z | 2 | 2 |
|
||||
| 2020-01-01T00:03:00Z | 1 | 3 |
|
||||
| 2020-01-01T00:04:00Z | 3 | 4 |
|
||||
|
||||
map_math:
|
||||
-
|
||||
code: |
|
||||
|
|
|
|||
Loading…
Reference in New Issue