Reputation: 1181
I want to join two influxdb measurement's timeseries together and perform some calculations. However, not even joining them seems to work ... The result is just empty. The measurements have a "time" and a "value" column.
data_1 = from(bucket:"telegraf/autogen")
|> range(start:-1h)
|> filter(fn: (r) =>
r._measurement == "measurement1" and
r._field == "value")
|> aggregateWindow(every: 1m, fn: mean)
data_2 = from(bucket:"telegraf/autogen")
|> range(start:-1h)
|> filter(fn: (r) =>
r._measurement == "measurement2" and
r._field == "value")
|> aggregateWindow(every: 1m, fn: mean)
join(tables: {d1: data_1, d2: data_2}, on: ["time"])
What am I doing wrong?
Upvotes: 0
Views: 648
Reputation: 482
You are using "time"
instead of "_time"
Try:
join(tables: {d1: data_1, d2: data_2}, on: ["_time"], method: "inner")
Upvotes: 1