Skip to content

Commit

Permalink
Merge branch 'main' into view-subsidio-historico
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Jan 16, 2025
2 parents 0ebe90a + f5cd9d4 commit e83adcf
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 17 deletions.
4 changes: 2 additions & 2 deletions pipelines/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ class constants(Enum): # pylint: disable=c0103
WHERE
id > {last_id} AND id <= {max_id}
""",
"page_size": 1000,
"max_pages": 70,
"page_size": 35000,
"max_pages": 2,
},
"primary_key": ["id"],
"interval_minutes": 5,
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: 2025-01-06
DBT: 2025-01-13
"""

from copy import deepcopy
Expand Down
5 changes: 5 additions & 0 deletions pipelines/migration/br_rj_riodejaneiro_gtfs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog - gtfs

## [1.2.1] - 2025-01-13

### Corrigido
- Removido teste de Ordem de Serviço regular (https://github.com/prefeitura-rio/pipelines_rj_smtr/pull/386)

## [1.2.0] - 2025-01-03

### Adicionado
Expand Down
2 changes: 1 addition & 1 deletion pipelines/migration/br_rj_riodejaneiro_gtfs/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"""
Flows for gtfs
DBT 2024-12-20
DBT 2025-01-13
"""

from prefect import Parameter, case, task
Expand Down
19 changes: 8 additions & 11 deletions pipelines/migration/br_rj_riodejaneiro_gtfs/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,18 +204,15 @@ def processa_ordem_servico(
None
"""

if (
len([sheet for sheet in sheetnames if "ANEXO I:" in sheet]) != 1
and regular_sheet_index is None
):
raise Exception(
"More than 1 regular sheet in the file. Please specify the regular sheet index."
)
# if (
# len([sheet for sheet in sheetnames if "ANEXO I " in sheet]) != 1
# and regular_sheet_index is None
# ):
# raise Exception(
# "More than 1 regular sheet in the file. Please specify the regular sheet index."
# )

if regular_sheet_index is None:
regular_sheet_index = next(
(i for i, name in enumerate(sheetnames) if "ANEXO I" in name), None
)
regular_sheet_index = next((i for i, name in enumerate(sheetnames) if "ANEXO I" in name), None)

quadro_geral = pd.DataFrame()

Expand Down
4 changes: 2 additions & 2 deletions queries/models/br_rj_riodejaneiro_bilhetagem/integracao.sql
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ from complete_partitions
where id_integracao not in (select id_integracao from integracoes_teste_invalidas)
qualify
row_number() over (
partition by id_integracao, id_transacao, priority
order by datetime_processamento_integracao desc
partition by id_integracao, id_transacao
order by datetime_processamento_integracao desc, priority
)
= 1

0 comments on commit e83adcf

Please sign in to comment.