Created
May 12, 2013 02:29
-
-
Save dsamojlenko/5562174 to your computer and use it in GitHub Desktop.
MySQL - import GTFS data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
truncate table agency; | |
LOAD DATA LOCAL INFILE 'agency.txt' INTO TABLE agency FIELDS TERMINATED BY ',' lines terminated by '\n' IGNORE 1 LINES; | |
truncate table calendar; | |
LOAD DATA LOCAL INFILE 'calendar.txt' INTO TABLE calendar FIELDS TERMINATED BY ',' lines terminated by '\n' IGNORE 1 LINES; | |
truncate table calendar_dates; | |
LOAD DATA LOCAL INFILE 'calendar_dates.txt' INTO TABLE calendar_dates FIELDS TERMINATED BY ',' lines terminated by '\n' IGNORE 1 LINES; | |
truncate table routes; | |
LOAD DATA LOCAL INFILE 'routes.txt' INTO TABLE routes FIELDS TERMINATED BY ',' lines terminated by '\n' IGNORE 1 LINES; | |
truncate table stop_times; | |
LOAD DATA LOCAL INFILE 'stop_times.txt' INTO TABLE stop_times FIELDS TERMINATED BY ',' lines terminated by '\n' IGNORE 1 LINES; | |
truncate table stops; | |
LOAD DATA LOCAL INFILE 'stops.txt' INTO TABLE stops FIELDS TERMINATED BY ',' lines terminated by '\n' IGNORE 1 LINES; | |
truncate table trips; | |
LOAD DATA LOCAL INFILE 'trips.txt' INTO TABLE trips FIELDS TERMINATED BY ',' lines terminated by '\n' IGNORE 1 LINES; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment