How can I use a subquery to translate airport code DAL into icao airport code KDAL, w air-routes?
I've loaded the air-routes data set, and I've added an aircraft like so:
I want to write a query that reports the location of all my aircrafts like so:
To accomplish this, I need to translate the IATA aircraft location "DAL" into the ICAO aircraft location "KDAL". So the .project() step is not straightforward.
How can I accomplish this? Details of what I've already tried in thread:
g.addV("aircraft").property("aircraftLocation", "DAL")I want to write a query that reports the location of all my aircrafts like so:
[tailNumber:N12345,aircraftLocationIcao:KDAL]To accomplish this, I need to translate the IATA aircraft location "DAL" into the ICAO aircraft location "KDAL". So the .project() step is not straightforward.
How can I accomplish this? Details of what I've already tried in thread:
Solution
Hi @danielcraig23, I might try to search for the the specific airports with the necessary iata->icao mapping instead of the "cross join then filter" approach. This is the traversal I came up with:
In my very small scale testing I'm seeing this run about an order of magnitude faster than the "cross join then filter" approach.
In my very small scale testing I'm seeing this run about an order of magnitude faster than the "cross join then filter" approach.