ROBY HERNAN RUBIANO
ROBY HERNAN RUBIANO

Reputation: 157

Join with trigger in siddhi

I have a question. I am using DAS 3.0.1.

Trazablack is a postgres table.

I cant make a join with the event Trazafiltrada, it's was create with the next code:

define trigger FiveMinTriggerStream at every 5 min;

from FiveMinTriggerStream join Trazablack as t
select t.sensorValue as sensorValue
insert into TrazaFiltrada;

But, I want make a join with of other event different, I'm using the next code:

from sensorStream JOIN TrazaFiltrada
on sensorStream.sensorValue==TrazaFiltrada.sensorValue
select sensorStream.meta_timestamp, sensorStream.meta_sensorName,
       sensorStream.correlation_longitude, sensorStream.correlation_latitude, sensorStream.sensorValue as valor1, TrazaFiltrada.sensorValue as valor2
insert into StreamPaso;

Trazablack           TrazaFiltrada         sensorStream
----------           -------------         -------------
156                   156                   156
170                   170 
85                    85 

My problem is that this query is null. Why?

Upvotes: 0

Views: 472

Answers (1)

ROBY HERNAN RUBIANO
ROBY HERNAN RUBIANO

Reputation: 157

I'm sorry, is important read the documentation for the next time.

WSO2 say:

  1. Join takes two streams as the input

  2. Each stream must have an associated window

  3. It generates the output events composed of one event from each stream

  4. With “on ” Siddhi joins only the events that matches the condition
  5. With “within ”, Siddhi joins only the events that are within that time of each other

Upvotes: 0

Related Questions