Skip to content

Commit

Permalink
Corrige duplicação de viagens em viagem_planejada (#266)
Browse files Browse the repository at this point in the history
* Corrige duplicação de viagens em viagem_planejada

* atualiza changelog

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
vtr363 and mergify[bot] authored Oct 9, 2024
1 parent 82a30bf commit e440773
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions queries/models/projeto_subsidio_sppo/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog - projeto_subsidio_sppo

## [9.0.4] - 2024-10-08

### Corrigido

- Corrigido a duplicação de viagens no modelo `viagens_planejadas` (https://github.com/prefeitura-rio/pipelines_rj_smtr/pull/266)

## [9.0.3] - 2024-09-23

### Alterado
Expand Down
3 changes: 2 additions & 1 deletion queries/models/projeto_subsidio_sppo/viagem_planejada.sql
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ WITH
sentido,
trip_id_planejado,
trip_id,
shape_id,
FROM
{{ ref("ordem_servico_trips_shapes_gtfs") }}
-- rj-smtr.gtfs.ordem_servico_trips_shapes
Expand Down Expand Up @@ -462,7 +463,7 @@ LEFT JOIN
USING (feed_start_date, feed_version, tipo_dia, tipo_os)
LEFT JOIN
trips AS t
USING (feed_start_date, feed_version, tipo_dia, tipo_os, servico, sentido)
USING (feed_start_date, feed_version, tipo_dia, tipo_os, servico, sentido, shape_id)
WHERE
data = DATE_SUB("{{ var('run_date') }}", INTERVAL 1 DAY)
AND faixa_horaria_inicio != "24:00:00"
Expand Down

0 comments on commit e440773

Please sign in to comment.