Add validation to importers to fix invalid/empty columns #222

This commit is contained in:
Nabeel Shahzad
2018-03-30 17:27:29 -05:00
parent bd30b1f900
commit 63544088cd
21 changed files with 124 additions and 68 deletions

View File

@@ -1,2 +1,3 @@
subfleet,name,registration,hex_code,status
A32X,A320-211,N309US,,
74X,747 400, ,,
1 subfleet name registration hex_code status
2 A32X A320-211 N309US
3 74X 747 400

View File

@@ -0,0 +1,3 @@
subfleet,name,registration,hex_code,status
A32X,A320-211,N309US,,
, B744-GE, N304,,
1 subfleet name registration hex_code status
2 A32X A320-211 N309US
3 B744-GE N304

View File

@@ -1,2 +1,3 @@
icao,iata,name,location,country,timezone,hub,lat,lon
KAUS,AUS,Austin-Bergstrom,"Austin, Texas, USA", United States,America/Chicago,1,30.1945,-97.6699
KJFK,JFK,Kennery,"Queens, New York, USA", United States,America/New_York,0,30.1945,abcd
1 icao iata name location country timezone hub lat lon
2 KAUS AUS Austin-Bergstrom Austin, Texas, USA United States America/Chicago 1 30.1945 -97.6699
3 KJFK JFK Kennery Queens, New York, USA United States America/New_York 0 30.1945 abcd

View File

@@ -0,0 +1,11 @@
airline,name,amount,type,charge_to_user,multiplier,active,ref_class,ref_class_id
,"Per-Flight (no muliplier)",100,F,0,0,1,,
,"Per-Flight (multiplier)",100,F,0,1,1,,
VMS,"Per-Flight (multiplier, on airline)",200,F,0,1,1,,
,"A daily fee",800,D,0,0,1,,
,"A monthly fee",5000,M,0,0,1,,
,Catering,1000,F,0,0,1,Subfleet,744-3X-RB211
,"Catering Staff",1000,D,0,0,1,Subfleet,744-3X-RB211
,Maintenance,1000,D,0,0,1,App\Models\Aircraft,001Z
1 airline name amount type charge_to_user multiplier active ref_class ref_class_id
2 Per-Flight (no muliplier) 100 F 0 0 1
3 Per-Flight (multiplier) 100 F 0 1 1
4 VMS Per-Flight (multiplier, on airline) 200 F 0 1 1
5 A daily fee 800 D 0 0 1
6 A monthly fee 5000 M 0 0 1
7 Catering 1000 F 0 0 1 Subfleet 744-3X-RB211
8 Catering Staff 1000 D 0 0 1 Subfleet 744-3X-RB211
9 Maintenance 1000 D 0 0 1 App\Models\Aircraft 001Z

View File

@@ -1,2 +1,3 @@
airline,flight_number,route_code,route_leg,dpt_airport,arr_airport,alt_airport,days,dpt_time,arr_time,level,distance,flight_time,flight_type,route,notes,active,subfleets,fares,fields
VMS,1972,,,KAUS,KJFK,KLGA,15,0810 CST,1235 EST,350,1477,207,J,ILEXY2 ZENZI LFK ELD J29 MEM Q29 JHW J70 STENT J70 MAGIO J70 LVZ LENDY6,"Just a flight",1,A32X,Y?price=300&cost=100&capacity=130;F?price=600&cost=400;B?,Departure Gate=4;Arrival Gate=C41
" ",1972,,,KAUS,KJFK,KLGA,15,0810 CST,1235 EST,350,1477,207,J,ILEXY2 ZENZI LFK ELD J29 MEM Q29 JHW J70 STENT J70 MAGIO J70 LVZ LENDY6,"Just a flight",1,A32X,Y?price=300&cost=100&capacity=130;F?price=600&cost=400;B?,Departure Gate=4;Arrival Gate=C41
1 airline flight_number route_code route_leg dpt_airport arr_airport alt_airport days dpt_time arr_time level distance flight_time flight_type route notes active subfleets fares fields
2 VMS 1972 KAUS KJFK KLGA 15 0810 CST 1235 EST 350 1477 207 J ILEXY2 ZENZI LFK ELD J29 MEM Q29 JHW J70 STENT J70 MAGIO J70 LVZ LENDY6 Just a flight 1 A32X Y?price=300&cost=100&capacity=130;F?price=600&cost=400;B? Departure Gate=4;Arrival Gate=C41
3 1972 KAUS KJFK KLGA 15 0810 CST 1235 EST 350 1477 207 J ILEXY2 ZENZI LFK ELD J29 MEM Q29 JHW J70 STENT J70 MAGIO J70 LVZ LENDY6 Just a flight 1 A32X Y?price=300&cost=100&capacity=130;F?price=600&cost=400;B? Departure Gate=4;Arrival Gate=C41

View File

@@ -1,2 +1,3 @@
airline,type,name,fares
VMS,A32X,Airbus A320,Y;B?capacity=100&price=500%
VMS, ,Boeing 747-400,Y;B?capacity=100&price=500%
1 airline type name fares
2 VMS A32X Airbus A320 Y;B?capacity=100&price=500%
3 VMS Boeing 747-400 Y;B?capacity=100&price=500%