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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Break up daily scheduled service index #2076

Merged
merged 8 commits into from Dec 15, 2022

Conversation

lauriemerrell
Copy link
Contributor

@lauriemerrell lauriemerrell commented Dec 12, 2022

Description

This PR:

  • Refactors int_gtfs_schedule__long_calendar to be more useful by expanding to the actual day level & fixes a bug where Sundays were miscoded
  • Creates int_gtfs_schedule__all_scheduled_service, which will support @owades on add check for proper lead time for schedule updates聽#2047
  • Fixes bugs in int_gttfs_schedule__daily_scheduled_service_index: one bug had Sundays miscoded so no calendar based Sunday service was appearing, and the other affected cases where a feed used both calendar and calendar_dates but had some service_ids that were unique to calendar_dates

TODO:

  • Talk to @owades
  • If we want to do this, update the existing _index table accordingly
  • Do we want to materialize as a table? 馃
  • Add YAML
  • Test warehouse image per @atvaccaro removed updates to poetry lockfile because it was causing unrelated issues

Resolves # [issue]

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation
  • agencies.yml

How has this been tested?

dbt run -s +int_gtfs_schedule__all_scheduled_service+
dbt test -s +int_gtfs_schedule__all_scheduled_service+

Screenshots (optional)

@owades
Copy link
Member

owades commented Dec 12, 2022

Thanks @lauriemerrell. Is the idea that this would go into the making of int_gtfs_schedule__daily_scheduled_service_index?

@lauriemerrell
Copy link
Contributor Author

@owades yes, the idea is that this creates a new int_gtfs_schedule__all_scheduled_service table (which is not filtered based on which feed is in effect on a given day) that your check and the existing index table can both consume. Your check can do the version over version comparison and the existing index table can just filter to only the feed versions we want to keep.

@lauriemerrell lauriemerrell force-pushed the break-up-daily-scheduled-service-index branch from a3b5a77 to 0d7476c Compare December 14, 2022 15:58
@lauriemerrell lauriemerrell force-pushed the break-up-daily-scheduled-service-index branch from 0d7476c to ff7def0 Compare December 14, 2022 21:58
@lauriemerrell lauriemerrell marked this pull request as ready for review December 14, 2022 22:39
Copy link
Member

@owades owades left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Looks good.

@atvaccaro atvaccaro merged commit 333455b into main Dec 15, 2022
@atvaccaro atvaccaro deleted the break-up-daily-scheduled-service-index branch December 15, 2022 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants