Skip to content

Commit e725cda

Browse files
vevetronV
andauthored
fix(dim_stops_latest): hotfix to stop duplicates from geometries causing fanout (#4942)
Co-authored-by: V <vevetron@gmail.com>
1 parent 22dd2a5 commit e725cda

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

warehouse/models/mart/gtfs_schedule_latest/dim_stops_latest.sql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ current_stops AS (
2929

3030

3131
stops_on_shn AS (
32-
SELECT
33-
current_stops.*
32+
SELECT distinct
33+
current_stops._gtfs_key
34+
-- current_stops.* old code, hotfix since we are getting duplicates here
3435
FROM buffer_geometry_table, current_stops
3536
WHERE ST_DWITHIN(
3637
buffer_geometry_table.buffer_geometry,current_stops.pt_geom, 0)

0 commit comments

Comments
 (0)