Closed EyalBerger closed 2 years ago
it can be joined via siri_ride_stop table, for example the following query gets all vehicle locations of a given journey_ref:
select *
from
siri_vehicle_location, siri_ride_stop, siri_ride
where
siri_vehicle_location.siri_ride_stop_id = siri_ride_stop.id
and siri_ride_stop.siri_ride_id = siri_ride.id
and siri_ride.journey_ref = '2021-11-10-39878369'
Yes, I figured out it could be joined vie stops, but logically the locations are connected with the rides, and this it going to be one of the most common joins we will perform. The merge via stops is not straight forward, but yet - as you mentioned - possible.
we should keep the database structure normalized, we can add database views / API methods / Python functions to make using it easier
Sure, so closing this issue.
Following the schema change (siri and gtfs separation), it's now not possible to join bus locations with siri ride directly. Could siri_ride_id be added to siri_vehicle_location table?