Skip to content

Commit

Permalink
fix(gtfs_rt_service_alerts): Changes datatype of active_period to str…
Browse files Browse the repository at this point in the history
…ings to accomodate some bad data (#3503)

Co-authored-by: V <[email protected]>
  • Loading branch information
vevetron and V authored Oct 16, 2024
1 parent a195faa commit 79a41be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ schema_fields:
mode: REPEATED
fields:
- name: start
type: INTEGER
type: STRING
- name: end
type: INTEGER
type: STRING

- name: informedEntity
type: RECORD
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ int_gtfs_rt__service_alerts_fully_unnested AS (
cause,
effect,

-- active periods
unnested_active_period.start AS active_period_start,
unnested_active_period.end AS active_period_end,
-- active periods, converting from STRINGS since some agency has bad data that insn't unnestable as INTs
SAFE_CAST(unnested_active_period.start AS INT) AS active_period_start,
SAFE_CAST(unnested_active_period.end AS INT) AS active_period_end,

-- informted entities
unnested_informed_entity.agencyId AS agency_id,
Expand Down

0 comments on commit 79a41be

Please sign in to comment.