Skip to content

Commit

Permalink
Merge branch 'main' into cgu_receitas_orcamento
Browse files Browse the repository at this point in the history
  • Loading branch information
tricktx authored Jan 9, 2025
2 parents b29d658 + 741ce40 commit 55e2557
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
"interval": 1,
},
},
cluster_by=["sigla_uf", "id_municipio"],
cluster_by=["sigla_uf", "ano_referencia", "mes_referencia", "id_municipio"],
)
}}

select distinct
safe_cast(split(mes_ref, '-')[offset(0)] as int64) as ano_competencia,
safe_cast(split(mes_ref, '-')[offset(1)] as int64) as mes_competencia,
Expand Down
7 changes: 6 additions & 1 deletion models/br_stf_corte_aberta/br_stf_corte_aberta__decisoes.sql
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
)
}}


select
safe_cast(ano as int64) ano,
safe_cast(classe as string) classe,
Expand All @@ -29,5 +30,9 @@ select
initcap(ramo_direito) ramo_direito,
safe_cast(date(data_autuacao) as date) data_autuacao,
safe_cast(date(data_decisao) as date) data_decisao,
safe_cast(date(data_baixa_processo) as date) data_baixa_processo
case
when data_baixa_processo = '---'
then null
else safe_cast(data_baixa_processo as date)
end data_baixa_processo
from `basedosdados-staging.br_stf_corte_aberta_staging.decisoes` as t

0 comments on commit 55e2557

Please sign in to comment.