20. New in 2.6 aggregation
• Cursors
• MaxTimeMS
• $out
• $redact
• $let/$map
• Misc - $cond with either object or array, set
expression, ..
21. Quiz - NYC Airports
1. Import data – mongoimport (flights, airports, planes)
2. Make join collection:
3. Query-Insert for all NYC data - ~500K flights per year originating in
JFK/EWR/LGA
{
"Year": 2008,
…
"LateAircraftDelay": "NA",
"to": {
"city": "Detroit",
"state": "MI",
"lat": 42.21205889,
"long": -83.34883583
},
"from": {
"city": "Newark",
"state": "NJ",
"lat": 40.69249722,
"long": -74.16866056
},
"aircraft": {
"manufacturer": "EMBRAER",
"model": "EMB-145EP",
"year": 1997
}
}
22. NYC Flights – Quiz Questions
• Of the three airports, who has the most flights?
– Nyc1
• Who has the most cancellations and highest cancellation ratio?
– Nyc2
• Taxi in/out times?
– Nyc3
• What about delays?
– Nyc4
• How do delays differ by month?
– Nyc5 + nyc5
– (summer vs. winter / bubble size vs. y-axis)
• What about weather delays only? Which months are worse? Are the three airports
equivalent?
– Nyc7 + nyc7
• Where can I fly to if I work for Boeing and am very loyal (and on which aicraft)?
– Nyc8 + map