diff --git a/pipelines/migration/br_rj_riodejaneiro_bilhetagem/flows.py b/pipelines/migration/br_rj_riodejaneiro_bilhetagem/flows.py index a43f302b..fc4e7ee0 100644 --- a/pipelines/migration/br_rj_riodejaneiro_bilhetagem/flows.py +++ b/pipelines/migration/br_rj_riodejaneiro_bilhetagem/flows.py @@ -2,7 +2,7 @@ """ Flows for br_rj_riodejaneiro_bilhetagem -DBT: 2025-01-06 +DBT: 2025-01-13 """ from copy import deepcopy diff --git a/queries/models/br_rj_riodejaneiro_bilhetagem/integracao.sql b/queries/models/br_rj_riodejaneiro_bilhetagem/integracao.sql index 0e8feebc..a772109e 100644 --- a/queries/models/br_rj_riodejaneiro_bilhetagem/integracao.sql +++ b/queries/models/br_rj_riodejaneiro_bilhetagem/integracao.sql @@ -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 \ No newline at end of file