Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Special handling for calendar_date#service_id reference not found in calendars.txt #202

Closed
landonreed opened this issue Feb 20, 2019 · 1 comment · Fixed by #201
Closed

Comments

@landonreed
Copy link
Contributor

landonreed commented Feb 20, 2019

As part of the MTC enhancements added for supporting merging feeds, a foreign reference was added to the calendar_dates#service_id table. Doing so allows us to scope the service_id and possibly remap it if conflicts are encountered between two feeds.

public static final Table CALENDAR_DATES = new Table("calendar_dates", CalendarDate.class, OPTIONAL,
new StringField("service_id", REQUIRED).isReferenceTo(CALENDAR),
new DateField("date", REQUIRED),
new IntegerField("exception_type", REQUIRED, 1, 2)
).keyFieldIsNotUnique();

However, this change will have the effect of causing false positives for referential integrity errors encountered during feed loading for GTFS feeds like TriMet's, which define service dates using calendar_dates (exception type = 1) alone. I have a fix inbound for this issue, which will only store the ref integrity error if the exception type is not 1.

@landonreed
Copy link
Contributor Author

🎉 This issue has been resolved in version 4.3.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant