Hello,
I have two sets of data: Trip Metadata(A) and Individual Trip Coordinates(B).
Set A fields:
- StartTime
- EndTime
Set B fields:
- Coordinates (Latitude and Longitude)
- Timestamp
How do I append the Set B Coordinate fields to events of Set A only if the Set B timestamp is between the Set A Start and End time?
Thanks for reading.
Both sets of data live in the same index but with different source types.
Sample Data:
Set A Trip Metadata (Multiple events(trips))
{ [-]
device_sn: GXXXXXG
id: qwg098wq7wq8
trip_distance_km: 4.927902
trip_end_time: 2018-11-19T23:46:56.0000000-05:00
trip_start_time: 2018-11-19T23:36:35.0000000-05:00
vehicle_name: Eric Jim
vehicle_vin: WG15
},
{ [-]
device_sn: GXXXXXG
id: 23jg9802j32
trip_distance_km: 4.927902
trip_end_time: 2018-11-19T23:06:56.0000000-05:00
trip_start_time: 2018-11-19T23:16:35.0000000-05:00
vehicle_name: Eric Jim
vehicle_vin: WG15
}
Set B Trip Individual Coordinates
{ [-]
device_sn: GXXXXXG
id: 9854gu45g
latitude: 33.7303314
longitude: -116.96965
speed_kph: 0
timestamp: 2018-11-19T23:47:02.0000000-05:00
vehicle_name: Eric Jim
vehicle_vin: WG15
}
... View more