forked from Altinity/clickhouse-mysql-data-reader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathairline_ontime_schema_mysql.sql
112 lines (112 loc) · 6.02 KB
/
airline_ontime_schema_mysql.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
CREATE DATABASE IF NOT EXISTS `airline`;
CREATE TABLE IF NOT EXISTS `airline`.`ontime` (
`Year` SMALLINT UNSIGNED, -- maps to UInt16,
`Quarter` TINYINT UNSIGNED, -- maps to UInt8,
`Month` TINYINT UNSIGNED, -- maps to UInt8,
`DayofMonth` TINYINT UNSIGNED, -- maps to UInt8,
`DayOfWeek` TINYINT UNSIGNED, -- maps to UInt8,
`FlightDate` DATE, -- maps to Date,
`UniqueCarrier` LONGTEXT, -- maps to String,
`AirlineID` INTEGER UNSIGNED, -- maps to UInt32,
`Carrier` LONGTEXT, -- maps to String,
`TailNum` LONGTEXT, -- maps to String,
`FlightNum` LONGTEXT, -- maps to String,
`OriginAirportID` INTEGER UNSIGNED, -- maps to UInt32,
`OriginAirportSeqID` INTEGER UNSIGNED, -- maps to UInt32,
`OriginCityMarketID` INTEGER UNSIGNED, -- maps to UInt32,
`Origin` LONGTEXT, -- maps to String,
`OriginCityName` LONGTEXT, -- maps to String,
`OriginState` LONGTEXT, -- maps to String,
`OriginStateFips` LONGTEXT, -- maps to String,
`OriginStateName` LONGTEXT, -- maps to String,
`OriginWac` INTEGER UNSIGNED, -- maps to UInt32,
`DestAirportID` INTEGER UNSIGNED, -- maps to UInt32,
`DestAirportSeqID` INTEGER UNSIGNED, -- maps to UInt32,
`DestCityMarketID` INTEGER UNSIGNED, -- maps to UInt32,
`Dest` LONGTEXT, -- maps to String,
`DestCityName` LONGTEXT, -- maps to String,
`DestState` LONGTEXT, -- maps to String,
`DestStateFips` LONGTEXT, -- maps to String,
`DestStateName` LONGTEXT, -- maps to String,
`DestWac` INTEGER UNSIGNED, -- maps to UInt32,
`CRSDepTime` INTEGER UNSIGNED, -- maps to UInt32,
`DepTime` INTEGER UNSIGNED, -- maps to UInt32,
`DepDelay` FLOAT, -- maps to Float32,
`DepDelayMinutes` FLOAT, -- maps to Float32,
`DepDel15` FLOAT, -- maps to Float32,
`DepartureDelayGroups` INTEGER, -- maps to Int32,
`DepTimeBlk` LONGTEXT, -- maps to String,
`TaxiOut` FLOAT, -- maps to Float32,
`WheelsOff` INTEGER UNSIGNED, -- maps to UInt32,
`WheelsOn` INTEGER UNSIGNED, -- maps to UInt32,
`TaxiIn` FLOAT, -- maps to Float32,
`CRSArrTime` INTEGER UNSIGNED, -- maps to UInt32,
`ArrTime` INTEGER UNSIGNED, -- maps to UInt32,
`ArrDelay` FLOAT, -- maps to Float32,
`ArrDelayMinutes` FLOAT, -- maps to Float32,
`ArrDel15` FLOAT, -- maps to Float32,
`ArrivalDelayGroups` INTEGER, -- maps to Int32,
`ArrTimeBlk` LONGTEXT, -- maps to String,
`Cancelled` FLOAT, -- maps to Float32,
`CancellationCode` LONGTEXT, -- maps to String,
`Diverted` FLOAT, -- maps to Float32,
`CRSElapsedTime` FLOAT, -- maps to Float32,
`ActualElapsedTime` FLOAT, -- maps to Float32,
`AirTime` FLOAT, -- maps to Float32,
`Flights` FLOAT, -- maps to Float32,
`Distance` FLOAT, -- maps to Float32,
`DistanceGroup` FLOAT, -- maps to Float32,
`CarrierDelay` FLOAT, -- maps to Float32,
`WeatherDelay` FLOAT, -- maps to Float32,
`NASDelay` FLOAT, -- maps to Float32,
`SecurityDelay` FLOAT, -- maps to Float32,
`LateAircraftDelay` FLOAT, -- maps to Float32,
`FirstDepTime` LONGTEXT, -- maps to String,
`TotalAddGTime` LONGTEXT, -- maps to String,
`LongestAddGTime` LONGTEXT, -- maps to String,
`DivAirportLandings` LONGTEXT, -- maps to String,
`DivReachedDest` LONGTEXT, -- maps to String,
`DivActualElapsedTime` LONGTEXT, -- maps to String,
`DivArrDelay` LONGTEXT, -- maps to String,
`DivDistance` LONGTEXT, -- maps to String,
`Div1Airport` LONGTEXT, -- maps to String,
`Div1AirportID` INTEGER UNSIGNED, -- maps to UInt32,
`Div1AirportSeqID` INTEGER UNSIGNED, -- maps to UInt32,
`Div1WheelsOn` LONGTEXT, -- maps to String,
`Div1TotalGTime` LONGTEXT, -- maps to String,
`Div1LongestGTime` LONGTEXT, -- maps to String,
`Div1WheelsOff` LONGTEXT, -- maps to String,
`Div1TailNum` LONGTEXT, -- maps to String,
`Div2Airport` LONGTEXT, -- maps to String,
`Div2AirportID` INTEGER UNSIGNED, -- maps to UInt32,
`Div2AirportSeqID` INTEGER UNSIGNED, -- maps to UInt32,
`Div2WheelsOn` LONGTEXT, -- maps to String,
`Div2TotalGTime` LONGTEXT, -- maps to String,
`Div2LongestGTime` LONGTEXT, -- maps to String,
`Div2WheelsOff` LONGTEXT, -- maps to String,
`Div2TailNum` LONGTEXT, -- maps to String,
`Div3Airport` LONGTEXT, -- maps to String,
`Div3AirportID` INTEGER UNSIGNED, -- maps to UInt32,
`Div3AirportSeqID` INTEGER UNSIGNED, -- maps to UInt32,
`Div3WheelsOn` LONGTEXT, -- maps to String,
`Div3TotalGTime` LONGTEXT, -- maps to String,
`Div3LongestGTime` LONGTEXT, -- maps to String,
`Div3WheelsOff` LONGTEXT, -- maps to String,
`Div3TailNum` LONGTEXT, -- maps to String,
`Div4Airport` LONGTEXT, -- maps to String,
`Div4AirportID` INTEGER UNSIGNED, -- maps to UInt32,
`Div4AirportSeqID` INTEGER UNSIGNED, -- maps to UInt32,
`Div4WheelsOn` LONGTEXT, -- maps to String,
`Div4TotalGTime` LONGTEXT, -- maps to String,
`Div4LongestGTime` LONGTEXT, -- maps to String,
`Div4WheelsOff` LONGTEXT, -- maps to String,
`Div4TailNum` LONGTEXT, -- maps to String,
`Div5Airport` LONGTEXT, -- maps to String,
`Div5AirportID` INTEGER UNSIGNED, -- maps to UInt32,
`Div5AirportSeqID` INTEGER UNSIGNED, -- maps to UInt32,
`Div5WheelsOn` LONGTEXT, -- maps to String,
`Div5TotalGTime` LONGTEXT, -- maps to String,
`Div5LongestGTime` LONGTEXT, -- maps to String,
`Div5WheelsOff` LONGTEXT, -- maps to String,
`Div5TailNum` LONGTEXT -- maps to String
);