Kapacitor - join asynchronous streams



Is there a way to join asynchronous streams in Kapacitor ?
As an example let’s say I have

  • a periodic stream of data that comes in every hour (m1)
  • another periodic reference stream that comes in once per day (m2)
    My requirement is that everytime m1 comes in, I want to divide it by the latest existing reference (m2)

My current script only works when m1 and m2 are written together into influxdb

var m1 = stream
.groupBy(‘A’, ‘B’, ‘C’)

var m2 = stream
.groupBy(‘A’, ‘B’, ‘C’)
|join (m2)
.as(‘m1’, ‘m2’)
|eval(lambda: float(“m1.value”) / float(“m2.value”))
.tag(‘kapacitor’, ‘true’)

But I’m not sure how to change the script to run when only m1 is updated.

Thanks for your help.