Hello,
I’m trying to join two tables on _field column without success. The result table remains empty.
idTable = csv.from(csv: csvData, mode: "raw")
|> map(fn: (r) => ({r with ID: int(v: r.ID)}))
|> group(columns: ["ID"])
sandb = from(bucket: "sandb4")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] =~ /diag_stats_./)
|> map(fn: (r) => ({r with _field: strings.replaceAll(v: r._field, t: "id_", u: "")}))
|> map(fn: (r) => ({r with _field: int(v: r._field)}))
|>last()
|>group(columns: ["_field"])
join.inner(
left: sandb,
right: idTable,
on: (l, r) => l._field == r.ID,
as: (l, r) => ({EN: r.EN, ID: r.ID,_value:l._value}),
)
This is how these two streams look like:
idTable:
sandb:
Any suggestions?
Thank you in advance
Kai