Skip to content

Commit

Permalink
Materialização de viagem_planejada em D+0 (#125)
Browse files Browse the repository at this point in the history
* commit inicial

* update changelog
  • Loading branch information
eng-rodrigocunha authored Aug 1, 2024
1 parent 4305911 commit 88cf689
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
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

## [6.0.3] - 2024-08-01

### Alterado

- Alterados modelos `viagem_planejada.sql` e `subsidio_data_versao_efetiva.sql` para materializar sempre em D+0 e permitir acompanhamento pelos operadores (https://github.com/prefeitura-rio/pipelines_rj_smtr/pull/125)

## [6.0.2] - 2024-04-22

### Adicionado
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,9 +368,9 @@ WITH
(feed_version)
WHERE
{% if is_incremental() %}
data = DATE_SUB(DATE("{{ var("run_date") }}"), INTERVAL 1 DAY)
data BETWEEN DATE_SUB("{{ var('run_date') }}", INTERVAL 1 DAY) AND DATE("{{ var('run_date') }}")
{% else %}
data <= DATE_SUB(DATE("{{ var("run_date") }}"), INTERVAL 1 DAY)
data <= DATE("{{ var('run_date') }}")
{% endif %}
)
SELECT
Expand Down
2 changes: 1 addition & 1 deletion queries/models/projeto_subsidio_sppo/viagem_planejada.sql
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ WITH
{{ ref("subsidio_data_versao_efetiva") }}
-- rj-smtr-dev.projeto_subsidio_sppo.subsidio_data_versao_efetiva
WHERE
data = DATE_SUB("{{ var('run_date') }}", INTERVAL 1 DAY) )
data BETWEEN DATE_SUB("{{ var('run_date') }}", INTERVAL 1 DAY) AND DATE("{{ var('run_date') }}"))
SELECT
d.data,
CASE
Expand Down

0 comments on commit 88cf689

Please sign in to comment.