I have a 2 data streams (Eg)
ts | device | custId | temp
1 | 'device1'| 1 | 10
1 | 'device2'| 4 | 7
2 | 'device1'| 1 | 10
3 | 'device1'| 1 | 10
4 | 'device1'| 1 | 10
5 | 'device2'| 4 | 10
I have created an CEP pattern where I want to check if within 4 seconds the temperature is greater than 30.
val pattern = Pattern.begin[Device]("start")
.where(_.sumtemp >= 30)
.within(Time.seconds(4))
Is there a way to join the output of this pattern stream to another incoming data stream to get below?.
ts | custId | morethanthiry
1 | 1 | yes
2 | 4 | no
I would be really grateful if an example could be shared to do this.