Skip to content

Commit

Permalink
Merge branch 'main' into add_format_sql
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Jan 6, 2025
2 parents 8badafb + bc2a38f commit c4dad57
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pipelines/migration/projeto_subsidio_sppo/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
Flows for projeto_subsidio_sppo
DBT: 2025-01-03
DBT: 2025-01-06
"""

from prefect import Parameter, case, task
Expand Down
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.1.4] - 2025-01-06

### Adicionado

- Adicionadas datas com os tipo os `Fim de ano`, `Reveillon` e tipo dia `Ponto facultativo` no modelo `subsidio_data_versao_efetiva.sql` (https://github.com/prefeitura-rio/pipelines_rj_smtr/pull/383)

## [9.1.3] - 2025-01-03

### Alterado
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ WITH
WHEN data = "2024-10-21" THEN "Ponto Facultativo" -- Ponto Facultativo - Dia do Comérciario - (Processo.Rio MTR-DES-2024/64171)
WHEN data = "2024-10-28" THEN "Ponto Facultativo" -- Ponto Facultativo - Dia do Servidor Público - (Processo.Rio MTR-DES-2024/64417)
WHEN data BETWEEN DATE(2024,11,18) AND DATE(2024,11,19) THEN "Ponto Facultativo" -- Ponto Facultativo - G20 - (Processo.Rio MTR-DES-2024/67477)
WHEN data = DATE(2024,12,24) THEN "Ponto Facultativo" -- Ponto Facultativo - Véspera de Natal - (Processo.Rio MTR-DES-2024/75723)
WHEN EXTRACT(DAY FROM data) = 20 AND EXTRACT(MONTH FROM data) = 1 THEN "Domingo" -- Dia de São Sebastião -- Art. 8°, I - Lei Municipal nº 5146/2010
WHEN EXTRACT(DAY FROM data) = 23 AND EXTRACT(MONTH FROM data) = 4 THEN "Domingo" -- Dia de São Jorge -- Art. 8°, II - Lei Municipal nº 5146/2010 / Lei Estadual Nº 5198/2008 / Lei Estadual Nº 5645/2010
WHEN EXTRACT(DAY FROM data) = 20 AND EXTRACT(MONTH FROM data) = 11 THEN "Domingo" -- Aniversário de morte de Zumbi dos Palmares / Dia da Consciência Negra -- Art. 8°, IV - Lei Municipal nº 5146/2010 / Lei Estadual nº 526/1982 / Lei Estadual nº 1929/1991 / Lei Estadual nº 4007/2002 / Lei Estadual Nº 5645/2010
Expand Down Expand Up @@ -359,6 +360,12 @@ WITH
WHEN data = DATE(2024,11,24) THEN "Parada LGBTQI+" -- Processo.Rio MTR-DES-2024/70057
WHEN data BETWEEN DATE(2024,12,07) AND DATE(2024,12,08) THEN "Extraordinária - Verão" -- Processo.Rio MTR-DES-2024/72800
WHEN data BETWEEN DATE(2024,12,14) AND DATE(2024,12,15) THEN "Extraordinária - Verão" -- Processo.Rio MTR-DES-2024/74396
WHEN data = DATE(2024,12,23) THEN "Fim de ano" -- Processo.Rio MTR-DES-2024/75723
WHEN data BETWEEN DATE(2024,12,26) AND DATE(2024,12,27) THEN "Fim de ano" -- Processo.Rio MTR-DES-2024/75723
WHEN data = DATE(2024,12,30) THEN "Fim de ano" -- Processo.Rio MTR-DES-2024/75723
WHEN data = DATE(2024,12,31) THEN "Vespera de Reveillon" -- Processo.Rio MTR-DES-2024/76453
WHEN data = DATE(2025,01,01) THEN "Reveillon" -- Processo.Rio MTR-DES-2024/76453
WHEN data BETWEEN DATE(2025,01,02) AND DATE(2025,01,03) THEN "Fim de ano" -- Processo.Rio MTR-DES-2024/77046
ELSE "Regular"
END AS tipo_os,
FROM UNNEST(GENERATE_DATE_ARRAY("{{var('DATA_SUBSIDIO_V6_INICIO')}}", "2025-12-31")) AS data),
Expand All @@ -369,6 +376,7 @@ WITH
CASE
WHEN tipo_os = "Extraordinária - Verão" THEN "Verão"
WHEN tipo_os LIKE "%Madonna%" THEN "Madonna"
WHEN tipo_os LIKE "%Reveillon%" THEN "Reveillon"
WHEN tipo_os = "Regular" THEN NULL
ELSE tipo_os
END AS subtipo_dia,
Expand Down

0 comments on commit c4dad57

Please sign in to comment.