I want to write a query that reports the location of all my aircrafts like so:
[tailNumber:N12345,aircraftLocationIcao:KDAL]
[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.
#This query doesn't work because it yields the three letter IATA airport code instead of the four letter ICAO airport codegremlin> g.V().hasLabel("aircraft").project("tailNumber", "aircraftLocationIcao").by("tailNumber").by("aircraftLocation")==>[tailNumber:N12345,aircraftLocationIcao:DAL]
#This query doesn't work because it yields the three letter IATA airport code instead of the four letter ICAO airport codegremlin> g.V().hasLabel("aircraft").project("tailNumber", "aircraftLocationIcao").by("tailNumber").by("aircraftLocation")==>[tailNumber:N12345,aircraftLocationIcao:DAL]
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: