duplicate_key error with fare_attributes when using multiple agencies #1916
ttaylor-avail
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is my first time interacting with this community. I wasn't sure if I should post this as an issue, or start here and wait for a suggestion. So here I am.
I'm receiving duplicate_key validation errors when I include multiple agencies in my fare_attributes.txt file, specifically when the same fare_id is used by more then one agency. I would assume if multiple agencies were listed in the file, the agency_id would also be included as part of the PK when determining duplicate keys.
I'm updating my GTFS export code to better support the consolidation of multiple agencies. Various unique IDs across the schedule set are be appended with an agency identifier. In the case of the fare_attributes file, I didn't think appending that same agency identifier to the fare_id field should be necessary since the agency_id is already a field.
Example output with duplicate_key validation errors:
fare_id,price,currency_type,payment_method,transfers,agency_id,transfer_duration
1,0.00,USD,0,0,0,0
2,0.00,USD,1,0,0,0
3,0.00,USD,1,0,0,0
4,0.00,USD,1,0,0,0
5,0.00,USD,1,0,0,0
1,0.00,USD,0,0,2,0
2,0.00,USD,0,0,2,0
3,0.00,USD,0,0,2,0
4,0.00,USD,0,0,2,0
5,0.00,USD,0,0,2,0
Beta Was this translation helpful? Give feedback.
All reactions