-
Notifications
You must be signed in to change notification settings - Fork 0
CSV Import
Dave Walker edited this page Dec 1, 2024
·
11 revisions
- The following illustrates the format in which sightings are exported
- It is also the format required for import of sightings from CSV files:
Flight,Airline,Registration,Serial Number,Manufacturer,Type,Age,From,To,Height,Date,Location,My Flight
"KL713","KLM","PH-BQG","32704","Boeing","777-206(ER)","18","AMS","PBM","34000","08/12/2023","Abingdon","False"
"KL758","KLM","PH-BKG","42508","Boeing","787-10 Dreamliner","3","PTY","AMS","39000","08/12/2023","Abingdon","False"
"AC870","Air Canada","C-FNNQ","43251","Boeing","777-333(ER)","9","YUL","CDG","37000","08/12/2023","Abingdon","False"
"AC872","Air Canada","C-FIUW","35249","Boeing","777-333(ER)","15","YYZ","CDG","35000","08/12/2023","Abingdon","True"
"NJE372D","NetJets Europe","CS-LAS","680A0015","Cessna","680A Citation Latitude","8","OXF","GVA","29650","08/12/2023","Abingdon","False"
"U2728","EasyJet","G-EZTH","3953","Airbus","A320-214","13","JER","MAN","30025","08/12/2023","Abingdon","False"
- Note that all fields must be double quoted "..."
- The following fields are optional and may be left blank:
- Age
- Serial number
- Manufacturer
- Type
- All other fields are required
- The "From" and "To" fields specify the IATA codes for the embarkation and destination airports
- Note that for CSV import, the airport IATA code validation (see the section on the Database) is bypassed
- The height is specified in feet
- The date is specified in DD/MM/YYYY format
- The year of manufacturer is calculated from the age, that is specified in years
- It is only stored if the manufacturer and model are also specified
- The "My Flight" field must be one of "True" or "False"
- To use the command line tool to import sightings, first build the tool as described in the "Command Line Tool" section of the Wiki
- Then import them using the following command line:
dotnet run -- import sightings <sightings.csv>
- Where "sightings.csv" is the path to the file containing the sightings in CSV format, as described above
- The data is appended to any existing data in the database
- If an aircraft, airline, flight, manufacturer or model already exists, those records will be used in the new sighting data rather than creating duplicate records
- The following illustrates the format in which airport details are exported
- It is also the format required for import of airport details from CSV files:
Code,Name,Country
"LON","London Metropolitan Area","United Kingdom"
"LCY","London - City Airport","United Kingdom"
"LGW","London - Gatwick","United Kingdom"
"LHR","London - Heathrow","United Kingdom"
"LTN","London - Luton","United Kingdom"
"STN","London - Stansted","United Kingdom"
- All fields are mandatory
- To use the command line tool to import airport details, first build the tool as described in the "Command Line Tool" section of the Wiki
- Then import them using the following command line:
dotnet run -- import airports <airports.csv>
- Where "airports.csv" is the path to the file containing the sightings in CSV format, as described above
- The data is appended to any existing data in the database
- If a country or airport already exist, those entries are reused rather than being duplicated