I have a task with 4 UDFs. After two of them I would like to store the result in a measurement and after that I would like to continue the processing with the two remaining UDFs and store there result in a different measurement.
I tried the following things:
1.:
stream |from() .measurement('Beacon') (at)smooth_rssi() (at)calculate_distances() |influxDBOut() .database('Beacons') .measurement('Distances') (at)determine_positions() smooth_positions() |influxDBOut() .database('Beacons') .measurement('DevicePositions')
=> Syntax error
2.:
var firstresult = stream
|from()
.measurement(‘Beacon’)
(at)smooth_rssi()
(at)calculate_distances()
firstresult
|influxDBOut()
.database(‘Beacons’)
.measurement(‘Distances’)firstresult
(at)determine_positions()
(at)smooth_positions()
|influxDBOut()
.database(‘Beacons’)
.measurement(‘DevicePositions’)
=> gets totally wrong input in third UDF
3: Two Tasks. Second is listening on first measurement.
=> After a few minutes the second Task gets the Points in a wrong order.
Is there a better way to do this?