Skip to content

Instantly share code, notes, and snippets.

@BohuTANG
Created January 21, 2022 02:15
Show Gist options
  • Save BohuTANG/6ce63243bd8304071cbf3976890fbd88 to your computer and use it in GitHub Desktop.
Save BohuTANG/6ce63243bd8304071cbf3976890fbd88 to your computer and use it in GitHub Desktop.
snow-ontime-schema.sql
CREATE TABLE IF NOT EXISTS ontime (
YEAR NUMBER(38,0),
QUARTER NUMBER(38,0),
MONTH NUMBER(38,0),
DAYOFMONTH NUMBER(38,0),
DAYOFWEEK NUMBER(38,0),
FLIGHTDATE VARCHAR(16777216),
REPORTING_AIRLINE VARCHAR(16777216),
DOT_ID_REPORTING_AIRLINE NUMBER(38,0),
IATA_CODE_REPORTING_AIRLINE VARCHAR(16777216),
TAIL_NUMBER VARCHAR(16777216),
FLIGHT_NUMBER_REPORTING_AIRLINE VARCHAR(16777216),
ORIGINAIRPORTID NUMBER(38,0),
ORIGINAIRPORTSEQID NUMBER(38,0),
ORIGINCITYMARKETID NUMBER(38,0),
ORIGIN VARCHAR(16777216),
ORIGINCITYNAME VARCHAR(16777216),
ORIGINSTATE VARCHAR(16777216),
ORIGINSTATEFIPS VARCHAR(16777216),
ORIGINSTATENAME VARCHAR(16777216),
ORIGINWAC NUMBER(38,0),
DESTAIRPORTID NUMBER(38,0),
DESTAIRPORTSEQID NUMBER(38,0),
DESTCITYMARKETID NUMBER(38,0),
DEST VARCHAR(16777216),
DESTCITYNAME VARCHAR(16777216),
DESTSTATE VARCHAR(16777216),
DESTSTATEFIPS VARCHAR(16777216),
DESTSTATENAME VARCHAR(16777216),
DESTWAC NUMBER(38,0),
CRSDEPTIME NUMBER(38,0),
DEPTIME NUMBER(38,0),
DEPDELAY NUMBER(38,0),
DEPDELAYMINUTES NUMBER(38,0),
DEPDEL15 NUMBER(38,0),
DEPARTUREDELAYGROUPS VARCHAR(16777216),
DEPTIMEBLK VARCHAR(16777216),
TAXIOUT NUMBER(38,0),
WHEELSOFF NUMBER(38,0),
WHEELSON NUMBER(38,0),
TAXIIN NUMBER(38,0),
CRSARRTIME NUMBER(38,0),
ARRTIME NUMBER(38,0),
ARRDELAY NUMBER(38,0),
ARRDELAYMINUTES NUMBER(38,0),
ARRDEL15 NUMBER(38,0),
ARRIVALDELAYGROUPS NUMBER(38,0),
ARRTIMEBLK VARCHAR(16777216),
CANCELLED NUMBER(38,0),
CANCELLATIONCODE VARCHAR(16777216),
DIVERTED NUMBER(38,0),
CRSELAPSEDTIME NUMBER(38,0),
ACTUALELAPSEDTIME NUMBER(38,0),
AIRTIME NUMBER(38,0),
FLIGHTS NUMBER(38,0),
DISTANCE NUMBER(38,0),
DISTANCEGROUP NUMBER(38,0),
CARRIERDELAY NUMBER(38,0),
WEATHERDELAY NUMBER(38,0),
NASDELAY NUMBER(38,0),
SECURITYDELAY NUMBER(38,0),
LATEAIRCRAFTDELAY NUMBER(38,0),
FIRSTDEPTIME VARCHAR(16777216),
TOTALADDGTIME VARCHAR(16777216),
LONGESTADDGTIME VARCHAR(16777216),
DIVAIRPORTLANDINGS VARCHAR(16777216),
DIVREACHEDDEST VARCHAR(16777216),
DIVACTUALELAPSEDTIME VARCHAR(16777216),
DIVARRDELAY VARCHAR(16777216),
DIVDISTANCE VARCHAR(16777216),
DIV1AIRPORT VARCHAR(16777216),
DIV1AIRPORTID NUMBER(38,0),
DIV1AIRPORTSEQID NUMBER(38,0),
DIV1WHEELSON VARCHAR(16777216),
DIV1TOTALGTIME VARCHAR(16777216),
DIV1LONGESTGTIME VARCHAR(16777216),
DIV1WHEELSOFF VARCHAR(16777216),
DIV1TAILNUM VARCHAR(16777216),
DIV2AIRPORT VARCHAR(16777216),
DIV2AIRPORTID NUMBER(38,0),
DIV2AIRPORTSEQID NUMBER(38,0),
DIV2WHEELSON VARCHAR(16777216),
DIV2TOTALGTIME VARCHAR(16777216),
DIV2LONGESTGTIME VARCHAR(16777216),
DIV2WHEELSOFF VARCHAR(16777216),
DIV2TAILNUM VARCHAR(16777216),
DIV3AIRPORT VARCHAR(16777216),
DIV3AIRPORTID NUMBER(38,0),
DIV3AIRPORTSEQID NUMBER(38,0),
DIV3WHEELSON VARCHAR(16777216),
DIV3TOTALGTIME VARCHAR(16777216),
DIV3LONGESTGTIME VARCHAR(16777216),
DIV3WHEELSOFF VARCHAR(16777216),
DIV3TAILNUM VARCHAR(16777216),
DIV4AIRPORT VARCHAR(16777216),
DIV4AIRPORTID NUMBER(38,0),
DIV4AIRPORTSEQID NUMBER(38,0),
DIV4WHEELSON VARCHAR(16777216),
DIV4TOTALGTIME VARCHAR(16777216),
DIV4LONGESTGTIME VARCHAR(16777216),
DIV4WHEELSOFF VARCHAR(16777216),
DIV4TAILNUM VARCHAR(16777216),
DIV5AIRPORT VARCHAR(16777216),
DIV5AIRPORTID NUMBER(38,0),
DIV5AIRPORTSEQID NUMBER(38,0),
DIV5WHEELSON VARCHAR(16777216),
DIV5TOTALGTIME VARCHAR(16777216),
DIV5LONGESTGTIME VARCHAR(16777216),
DIV5WHEELSOFF VARCHAR(16777216),
DIV5TAILNUM VARCHAR(16777216)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment