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

No way to check for/record duplicate transfers or fare rules #223

Open
landonreed opened this issue Apr 24, 2019 · 0 comments
Open

No way to check for/record duplicate transfers or fare rules #223

landonreed opened this issue Apr 24, 2019 · 0 comments

Comments

@landonreed
Copy link
Contributor

Currently the RDBMS validator will check for duplicate primary keys (e.g., stop_id in stops.txt) and duplicate compound keys composed of a string and an integer (e.g., trip_id + stop_sequence in stop_times.txt), but there is no way to check for duplicate keys that are composed of two strings. One such case where this omission could lead to logically incoherent results is for transfers.txt where two lines containing the same from_ and to_stop_id pair would be invalid (there may be some strategy that GTFS consumers use to prioritize one record over the another that I'm not aware of). Another similar case is duplicate lines in fare_rules.txt, e.g., two rows that contain the exact same information. Such an occurrence would be caught in stops.txt because of the duplicate primary key (on stop_id), but there is no primary key for this table and so a fare_rules table with 10 of the same duplicated row would throw no errors.

This has been somewhat addressed already in #200 with the addition of the hasCompoundKey method, but it does not fully account for proper storage of these errors because the error table expects an int for this value, not a String.

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

No branches or pull requests

1 participant