Skip to content

Commit

Permalink
Adicionando testes e ajustando tabelas
Browse files Browse the repository at this point in the history
  • Loading branch information
Winzen committed Nov 21, 2024
1 parent bc1652b commit 9fc3270
Show file tree
Hide file tree
Showing 5 changed files with 1,703 additions and 1,656 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
{{
config(
schema='br_tse_eleicoes',
alias = 'detalhes_votacao_municipio',
materialized='table',
schema="br_tse_eleicoes",
alias="detalhes_votacao_municipio",
materialized="table",
partition_by={
"field": "ano",
"data_type": "int64",
"range": {
"start": 1994,
"end": 2024,
"interval": 2
}
"range": {"start": 1994, "end": 2024, "interval": 2},
},
cluster_by=["sigla_uf"],
)
Expand All @@ -19,7 +15,9 @@
select
safe_cast(ano as int64) ano,
safe_cast(turno as int64) turno,
safe_cast(id_eleicao as string) id_eleicao,
safe_cast(tipo_eleicao as string) tipo_eleicao,
safe_cast(data_eleicao as date) data_eleicao,
safe_cast(sigla_uf as string) sigla_uf,
safe_cast(id_municipio as string) id_municipio,
safe_cast(id_municipio_tse as string) id_municipio_tse,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
{{
config(
schema='br_tse_eleicoes',
alias = 'detalhes_votacao_municipio_zona',
materialized='table',
schema="br_tse_eleicoes",
alias="detalhes_votacao_municipio_zona",
materialized="table",
partition_by={
"field": "ano",
"data_type": "int64",
"range": {
"start": 1994,
"end": 2024,
"interval": 2
}
"range": {"start": 1994, "end": 2024, "interval": 2},
},
cluster_by=["sigla_uf"],
)
Expand All @@ -19,7 +15,9 @@
select
safe_cast(ano as int64) ano,
safe_cast(turno as int64) turno,
safe_cast(id_eleicao as string) id_eleicao,
safe_cast(tipo_eleicao as string) tipo_eleicao,
safe_cast(data_eleicao as date) data_eleicao,
safe_cast(sigla_uf as string) sigla_uf,
safe_cast(id_municipio as string) id_municipio,
safe_cast(id_municipio_tse as string) id_municipio_tse,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ select
safe_cast(sigla_partido as string) sigla_partido,
safe_cast(cargo as string) cargo,
safe_cast(sequencial_receita as string) sequencial_receita,
safe_cast(data_receita as date) data_receita,
{{ validate_date_range("data_receita", "1900-01-01", "2100-01-01") }}
as data_receita,
safe_cast(fonte_receita as string) fonte_receita,
safe_cast(origem_receita as string) origem_receita,
safe_cast(natureza_receita as string) natureza_receita,
Expand Down
Loading

0 comments on commit 9fc3270

Please sign in to comment.