Skip to content
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

Filter tables in gtfs_schedule dataset to be only those in current agencies.yml #235

Closed
machow opened this issue Aug 2, 2021 · 0 comments · Fixed by #1320
Closed

Filter tables in gtfs_schedule dataset to be only those in current agencies.yml #235

machow opened this issue Aug 2, 2021 · 0 comments · Fixed by #1320
Assignees
Labels
project-gtfs-schedule For issues related to gtfs-schedule project

Comments

@machow
Copy link
Contributor

machow commented Aug 2, 2021

Related to (but not blocking) #233.

Currently, the gtfs_schedule contains the most recent data for all GTFS schedule feeds in the warehouse. This includes feeds that have been deleted from agencies.yml. We should...

  • use gtfs_schedule_history.calitp_status to mark in the gtfs_schedule_history.calitp_feed_latest when a feed is in the latest status (which is a tabled form of agencies.yml). E.g. create a is_in_agencies column.
  • create a gtfs_schedule.calitp_feeds table, which contains calitp_itp_id, calitp_url_number, agency_name, status, calitp_extracted_at for the latest calit_status (e.g. basically the same as views.gtfs_agency_names)
  • Filter on is_in_agencies in gtfs_schedule_loader DAG task gtfs_schedule_load_tables to only load current feeds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
project-gtfs-schedule For issues related to gtfs-schedule project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants