-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Transferred from GitLab] Creating GTFS DB #5
Comments
Are we planning to override the GTFS data on every import or do we want to accumulate it over time? I think accumulation makes sense for analysis but it means the import script has to be more clever than the current script. E.g. in the calendar table, every GTFS service only have future dates in the start_date field. The import script will have to recognise that this is the same old service and re-use the service record. What do you think? |
There is an option to exclude fields from the history table. If I get it right - excluding a field (e.g. the start_date field) means it won't create separated history records. Bottom line: the current import script (once it works) should do the job. |
Hi,
Notice this project - they created postgres schema for gtfs and used for trip_id chracter dataype: https://github.com/jedhorne/py-gtfs-postgres/blob/master/schema/gtfs_schema.create.sql |
I tested, cleaned up and documented the code written by @efratoio & @nitzangur. I am happy to say that it works, and we have the sample gtfs data in the obus database on our server now! Thanks for everyone who worked on this issue! There's a readme file that documents how to run it. While this works, there is a performance issue. In my tests on the server is took about 1 second per 1000 records. The stop_times table in recent GTFS files has about ~20M records, so it would take hours to insert it. I think the key is to do some kind of batch, rather than inserting 1-by-1. I am going to open a separate issue for that. |
[Originally posted by @nitzangur ]
A basic scheme is now available under gtfs/.
Next steps:
Scheme level:
IT level:
Code level:
Feel free to add/change some steps. Please response to this issue if you intend to perform some of these steps. (I guess those remarks are relevant to all of the issues.)
The text was updated successfully, but these errors were encountered: