Duplicate FlightID returned from FlightInfoEx

Calling FlightInfoEx with tail N585JB I see a duplicate flightID (JBU6185-1597003782-0-0-154) in the response.

The FAQ says flightIDs must be always unique… is this a bug or are there scenarios we need to code for?

Here’s the relevant section of the JSON:

        {
            "faFlightID": "JBU6185-1597003782-0-0-154",
            "ident": "JBU6185",
            "aircrafttype": "A320",
            "filed_ete": "02:55:00",
            "filed_time": 1597005375,
            "filed_departuretime": 1597003200,
            "filed_airspeed_kts": 374,
            "filed_airspeed_mach": "",
            "filed_altitude": 0,
            "route": "SSOXS5 SSOXS BUZRD SEY HTO J174 SWL CEBEE WETRO ILM AR17 HIBAC CWRLD4",
            "actualdeparturetime": -1,
            "estimatedarrivaltime": -1,
            "actualarrivaltime": -1,
            "diverted": "t",
            "origin": "KBOS",
            "destination": "KMCO",
            "originName": "Boston Logan Intl",
            "originCity": "Boston, MA",
            "destinationName": "Orlando Intl",
            "destinationCity": "Orlando, FL"
        },
        {
            "faFlightID": "JBU6185-1597003782-0-0-154",
            "ident": "JBU6185",
            "aircrafttype": "A320",
            "filed_ete": "02:55:00",
            "filed_time": 1597005375,
            "filed_departuretime": 1597003200,
            "filed_airspeed_kts": 374,
            "filed_airspeed_mach": "",
            "filed_altitude": 0,
            "route": "SSOXS5 SSOXS BUZRD SEY HTO J174 SWL CEBEE WETRO ILM AR17 HIBAC CWRLD4",
            "actualdeparturetime": 1597005360,
            "estimatedarrivaltime": 1597015166,
            "actualarrivaltime": 1597015166,
            "diverted": "",
            "origin": "KBOS",
            "destination": "KPBI",
            "originName": "Boston Logan Intl",
            "originCity": "Boston, MA",
            "destinationName": "Palm Beach Intl",
            "destinationCity": "West Palm Beach, FL"
        },

It is the same flight, however the additional entry represents a diversion to a new destination. Notice the "diverted": "t", on one of them.

Thanks, that makes sense is this new behavior? Been ingesting for a while and never seen that before.

No, that has been the behavior for at least 10 years now.

You’re right. I went back and looked at the schema and we do a composite key on flightID and diverted. In the case of this call though, the data is coming back with the flight three times:
{
“faFlightID”: “JBU6185-1597003782-0-0-154”,
“ident”: “JBU6185”,
“aircrafttype”: “A320”,
“filed_ete”: “02:55:00”,
“filed_time”: 1597005375,
“filed_departuretime”: 1597003200,
“filed_airspeed_kts”: 374,
“filed_airspeed_mach”: “”,
“filed_altitude”: 0,
“route”: “SSOXS5 SSOXS BUZRD SEY HTO J174 SWL CEBEE WETRO ILM AR17 HIBAC CWRLD4”,
“actualdeparturetime”: -1,
“estimatedarrivaltime”: -1,
“actualarrivaltime”: -1,
“diverted”: “t”,
“origin”: “KBOS”,
“destination”: “KFLL”,
“originName”: “Boston Logan Intl”,
“originCity”: “Boston, MA”,
“destinationName”: “Fort Lauderdale Intl”,
“destinationCity”: “Fort Lauderdale, FL”
},
{
“faFlightID”: “JBU6185-1597003782-0-0-154”,
“ident”: “JBU6185”,
“aircrafttype”: “A320”,
“filed_ete”: “02:55:00”,
“filed_time”: 1597005375,
“filed_departuretime”: 1597003200,
“filed_airspeed_kts”: 374,
“filed_airspeed_mach”: “”,
“filed_altitude”: 0,
“route”: “SSOXS5 SSOXS BUZRD SEY HTO J174 SWL CEBEE WETRO ILM AR17 HIBAC CWRLD4”,
“actualdeparturetime”: -1,
“estimatedarrivaltime”: -1,
“actualarrivaltime”: -1,
“diverted”: “t”,
“origin”: “KBOS”,
“destination”: “KMCO”,
“originName”: “Boston Logan Intl”,
“originCity”: “Boston, MA”,
“destinationName”: “Orlando Intl”,
“destinationCity”: “Orlando, FL”
},
{
“faFlightID”: “JBU6185-1597003782-0-0-154”,
“ident”: “JBU6185”,
“aircrafttype”: “A320”,
“filed_ete”: “02:55:00”,
“filed_time”: 1597005375,
“filed_departuretime”: 1597003200,
“filed_airspeed_kts”: 374,
“filed_airspeed_mach”: “”,
“filed_altitude”: 0,
“route”: “SSOXS5 SSOXS BUZRD SEY HTO J174 SWL CEBEE WETRO ILM AR17 HIBAC CWRLD4”,
“actualdeparturetime”: 1597005360,
“estimatedarrivaltime”: 1597015166,
“actualarrivaltime”: 1597015166,
“diverted”: “”,
“origin”: “KBOS”,
“destination”: “KPBI”,
“originName”: “Boston Logan Intl”,
“originCity”: “Boston, MA”,
“destinationName”: “Palm Beach Intl”,
“destinationCity”: “West Palm Beach, FL”
},

We’ve never seen that before, otherwise ingest would fail.

That flight happened to have diverted twice before finally landing at KPBI. Uncommon, but not that rare. Happens more with General Aviation flights

OK, if we added destination ICAO into the composite key would that be sufficient to make this unique? Or are there ever scenarios where we would see a divert to the same destination airport?

Flights can divert multiple times, including back to their original destination airport (for example after resolving the emergency condition while in flight and no longer needing to go to the diversion airport).