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

service_id not necessarily numeric #4

Open
stationstops opened this issue Feb 9, 2010 · 1 comment
Open

service_id not necessarily numeric #4

stationstops opened this issue Feb 9, 2010 · 1 comment

Comments

@stationstops
Copy link

service_id is not necessarily numeric (example: 'weekday')

FIX:

  1. Switch to varchar(50) in sql files where service_id defined
  2. implement following diff in build_indices.py:

33c33

< service_id = int(row[0])

    service_id = row[0]

36c36

< sql = "UPDATE calendar SET start_date_timestamp=%d, end_date_timestamp=%d WHERE service_id=%d AND start_date='%s' AND end_date='%s'" % (convert_date_string_to_timestamp(start_date), convert_date_string_to_timestamp(end_date), service_id, start_date, end_date)

    sql = "UPDATE calendar SET start_date_timestamp=%d, end_date_timestamp=%d WHERE service_id='%s' AND start_date='%s' AND end_date='%s'" % (convert_date_string_to_timestamp(start_date), convert_date_string_to_timestamp(end_date), service_id, start_date, end_date)

52c52

< service_id = int(row[0])

    service_id = row[0]

54c54

< sql = "UPDATE calendar_dates SET date_timestamp=%d WHERE service_id=%d AND date='%s'" % (convert_date_string_to_timestamp(date), service_id, date)

    sql = "UPDATE calendar_dates SET date_timestamp=%d WHERE service_id='%s' AND date='%s'" % (convert_date_string_to_timestamp(date), service_id, date)
@gjtorikian
Copy link

This is also true of trip_id and stop_id in stop_times. For an example of this (non-int) value, see the BART GTFS feed.

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

2 participants