Skip to content

Commit

Permalink
Merge pull request #601 from basedosdados/br_cgu_emenda_parlamentar
Browse files Browse the repository at this point in the history
[dados] br_cgu_emendas_parlamentares
  • Loading branch information
tricktx authored Aug 29, 2024
2 parents 8f2ffa0 + bd8e5e9 commit 7a7e581
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ models:
+schema: br_cgu_dados_abertos
br_cgu_emenda_parlamentar:
+materialized: table
+schema: br_cgu_emenda_parlamentar
+schema: br_cgu_emendas_parlamentares
br_cgu_pessoal_executivo_federal:
+materialized: table
+schema: br_cgu_pessoal_executivo_federal
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{{
config(
alias="microdados", schema="br_cgu_emenda_parlamentar", materialized="table"
alias="microdados",
schema="br_cgu_emendas_parlamentares",
materialized="table",
)
}}

Expand All @@ -11,9 +13,13 @@ with
safe_cast(
replace(`Código da Emenda`, "Sem informaç", "Sem informação") as string
) codigo_emenda,
safe_cast(`Número da emenda` as string) numero_emenda,
safe_cast(
replace(`Número da emenda`, "S/I", "Sem informação") as string
) numero_emenda,
safe_cast(`Tipo de Emenda` as string) tipo_emenda,
safe_cast(`Código do Autor da Emenda` as string) codigo_autor_emenda,
safe_cast(
replace(`Código do Autor da Emenda`, "S/I", "Sem informação") as string
) codigo_autor_emenda,
safe_cast(`Nome do Autor da Emenda` as string) nome_autor_emenda,
case
when `Localidade do gasto` = 'PRESIDENTE JUSCELINO - RN'
Expand All @@ -34,7 +40,7 @@ with
`Valor Restos A Pagar Cancelados` as float64
) valor_resto_pagar_cancelado,
safe_cast(`Valor Restos A Pagar Pagos` as float64) valor_resto_pagar_pagos,
from `basedosdados-dev.br_cgu_emenda_parlamentar_staging.microdados`
from `basedosdados-dev.br_cgu_emendas_parlamentares_staging.microdados`
),
tabela_1 as (
select
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
version: 2
models:
- name: br_cgu_emenda_parlamentar__microdados
- name: br_cgu_emendas_parlamentares__microdados
description: Dados referente a emendas parlamentares
tests:
- dbt_utils.unique_combination_of_columns:
Expand Down

0 comments on commit 7a7e581

Please sign in to comment.