Skip to content

Commit

Permalink
HOTFIX - Corrige referências na aux_passageiros_hora (#165)
Browse files Browse the repository at this point in the history
* altera para ephemeral

* adiciona filtre de timestamp_captura

* separa materializacao transacao e passageiros_hora

* corrige table_id

* otimiza filtro de particao

* add dependencia transacao

* add captura endereco e linha_op_transporte

* cria modelo

* add coluna geo_point_transacao

* add particoes integracao

* add linha_consorcio_operadora_transporte/endereco

* add changelog

* corrige referencia

* registra flows

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
pixuimpou and mergify[bot] authored Aug 26, 2024
1 parent 222ffa6 commit 8be6950
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog - br_rj_riodejaneiro_bilhetagem

## [1.4.0] - 2024-08-26

### Alterado

- Separa materialização da `passageiros_hora` da `transacao` (https://github.com/prefeitura-rio/pipelines_rj_smtr/pull/164)

## [1.3.1] - 2024-08-19

### Alterado
Expand Down
2 changes: 1 addition & 1 deletion pipelines/migration/br_rj_riodejaneiro_bilhetagem/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"""
Flows for br_rj_riodejaneiro_bilhetagem
DBT: 2024-08-21 2
DBT: 2024-08-26
"""

from copy import deepcopy
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Changelog - br_rj_riodejaneiro_onibus_gps_zirix

## [1.0.0] - 2024-08-26

### Corrigido
- Corrige table_id na task `get_materialization_date_range` no flow `materialize_sppo_zirix` (https://github.com/prefeitura-rio/pipelines_rj_smtr/pull/164)
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"""
Flows for br_rj_riodejaneiro_onibus_gps_zirix
DBT 2024-08-20
DBT 2024-08-26
"""
from prefect import Parameter, case
from prefect.run_configs import KubernetesRun
Expand Down
16 changes: 16 additions & 0 deletions queries/models/br_rj_riodejaneiro_bilhetagem/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog - bilhetagem

## [2.3.0] - 2024-08-26

### Adicionado
- Cria modelos `staging_linha_consorcio_operadora_transporte.sql` e `staging_endereco.sql` (https://github.com/prefeitura-rio/pipelines_rj_smtr/pull/164)

### Alterado
- Utiliza data e hora no filtro incremental dos modelos (https://github.com/prefeitura-rio/pipelines_rj_smtr/pull/164):
- `transacao.sql`
- `transacao_riocard.sql`
- `passageiros_hora.sql`
- `passageiros_tile_hora.sql`
- Adiciona coluna geo_point_transacao nos modelos `transacao.sql` e `transacao_riocard.sql` (https://github.com/prefeitura-rio/pipelines_rj_smtr/pull/164)
- Altera materialized do modelo `aux_passageiros_hora.sql` de `table` para `ephemeral` (https://github.com/prefeitura-rio/pipelines_rj_smtr/pull/164)
- Adiciona transações do RioCard no modelo `aux_passageiros_hora.sql` (https://github.com/prefeitura-rio/pipelines_rj_smtr/pull/164)


## [2.2.1] - 2024-08-09

### Adicionado
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ SELECT
tipo_pagamento,
geo_point_transacao
FROM
{{ transacao_table }}
{{ ref('transacao') }}
WHERE
id_servico_jae NOT IN ("140", "142")
AND id_operadora != "2"
Expand Down Expand Up @@ -54,7 +54,7 @@ SELECT
"RioCard" AS tipo_pagamento,
ST_GEOGPOINT(longitude, latitude) AS geo_point_transacao
FROM
{{ transacao_riocard_table }}
{{ ref('transacao_riocard') }}
WHERE
(id_servico_jae NOT IN ("140", "142") OR id_servico_jae IS NULL)
AND (id_operadora != "2" OR id_operadora IS NULL)
Expand Down

0 comments on commit 8be6950

Please sign in to comment.