I’m attempting to join a timeseries on a tag with an array, but getting no results on an inner join.
This is very similar to the example, which is why I don’t understand why I cannot get it to work.
import "array"
import "join"
left = from(bucket: "default")
|> range(start: v.timeRangeStart, stop:v.timeRangeStop)
|> filter(fn: (r) =>
r._measurement == "http" and
r._field == "inbound" and
r.env == "${env}" and
r.service == <service name removed>
)
This left query returns several timeseries which include a tag called “trunk” (uuid).
I want to join them on a static array
right = array.from(
rows: [
{trunk: "2633d362-396b-444e-86f9-22fc2b79dad6", edgeId: "988574b0-2fa8-4366-a460-a8e2f40c298a"},
{trunk: "35d12dc3-3981-4ea9-89c9-16a38cd9cbb0", edgeId: "dbf80f69-312a-447c-85a0-44229a8926e4"},
{trunk: "1a010efa-93fa-429c-8528-44f8f856d0ee", edgeId: "c2ce2fd0-7762-4acd-917e-274a2520b47c"},
{trunk: "10b62afd-926a-4173-9846-4ced053359ff", edgeId: "92a78f79-92a9-4afe-ac1d-49d55f8b2b84"},
{trunk: "2c46e4f0-6b68-4a43-930d-2155814787cb", edgeId: "de235457-ed08-4f38-a51d-c91515914960"},
{trunk: "1005edef-5c35-4202-bc39-4041d7102cf7", edgeId: "a0d86d05-bed2-4d6b-8682-c3bb38a0664b"},
{trunk: "18d3e644-cb88-4e16-9faf-71cb2695adeb", edgeId: "3b5941dc-d394-43a5-be40-9db6c3bbb3b8"},
...
I have ensured that the values for trunk
in left do exist in the static array.
And when I do this very simple join I get no rows
join.inner(
left: left,
right: right,
on: (l, r) => l.trunk == r.trunk,
as: (l, r) => ({l with edgeId: r.edgeId})
)