Skip to content

Instantly share code, notes, and snippets.

@amitlzkpa
Forked from dsamojlenko/ImportGTFSData.sh
Created April 13, 2019 06:37
Show Gist options
  • Save amitlzkpa/5b1402cc34ef39e28f35120a49e49227 to your computer and use it in GitHub Desktop.
Save amitlzkpa/5b1402cc34ef39e28f35120a49e49227 to your computer and use it in GitHub Desktop.
Import GTFS data to MongoDB
mongoimport --db <dbname> --collection agencies --type csv --headerline --file agency.txt
mongoimport --db <dbname> --collection calendardates --type csv --headerline --file calendar_dates.txt
mongoimport --db <dbname> --collection calendars --type csv --headerline --file calendar.txt
mongoimport --db <dbname> --collection routes --type csv --headerline --file routes.txt
mongoimport --db <dbname> --collection stoptimes --type csv --headerline --file stop_times.txt
mongoimport --db <dbname> --collection stops --type csv --headerline --file stops.txt
mongoimport --db <dbname> --collection trips --type csv --headerline --file trips.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment