Archived
0
0
Fork 0
This repository has been archived on 2024-05-09. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
nextrip/Data Load/gtfs.sql
2018-05-24 21:09:29 -05:00

21 lines
No EOL
581 B
PL/PgSQL

BEGIN;
CREATE SCHEMA mt;
CREATE TABLE mt.stops
(
stop_id int primary key,
stop_code text,
stop_name text,
stop_desc text,
stop_lat double precision,
stop_lon double precision,
zone_id text,
stop_url text,
location_type int,
wheelchair_boarding int
);
COPY mt.stops FROM PROGRAM 'wget ftp://ftp.gisdata.mn.gov/pub/gdrs/data/pub/us_mn_state_metc/trans_transit_schedule_google_fd/csv_trans_transit_schedule_google_fd.zip 2> /dev/null 1>&2 && unzip csv_trans_transit_schedule_google_fd.zip 2>/dev/null 1>&2 && cat stops.txt' CSV HEADER;
END;