Skip to content

Commit

Permalink
Atualizar resultados_candidato com 2024 e colocar testes
Browse files Browse the repository at this point in the history
  • Loading branch information
Winzen committed Oct 24, 2024
1 parent 864e8dd commit 2441e38
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
partition_by={
"field": "ano",
"data_type": "int64",
"range": {"start": 1945, "end": 2022, "interval": 1},
"range": {"start": 1945, "end": 2024, "interval": 1},
},
)
}}
Expand All @@ -15,7 +15,7 @@ select
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 string) data_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
20 changes: 19 additions & 1 deletion models/br_tse_eleicoes/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,7 @@ models:
- numero_candidato
- nome_candidato
- not_null_proportion_multiple_columns:
at_least: 0.95
at_least: 0.80
columns:
- name: ano
description: Ano
Expand All @@ -1186,14 +1186,27 @@ models:
description: Cargo
- name: data_eleicao
description: Data da eleição
tests:
- relationships:
to: ref('br_bd_diretorios_data_tempo__data')
field: data.data
- name: id_candidato_bd
description: ID Candidato - Base dos Dados
- name: id_eleicao
description: ID Eleição
- name: id_municipio
description: ID Município - IBGE 7 Dígitos
tests:
- relationships:
to: ref('br_bd_diretorios_brasil__municipio')
field: id_municipio
- name: id_municipio_tse
description: ID Município - TSE
tests:
- custom_relationships:
to: ref('br_bd_diretorios_brasil__municipio')
field: id_municipio_tse
ignore_values: ['73709']
- name: nome_candidato
description: Nome do candidato
- name: numero_candidato
Expand All @@ -1208,6 +1221,11 @@ models:
description: Sigla do partido
- name: sigla_uf
description: Sigla da unidade da federação
tests:
- custom_relationships:
to: ref('br_bd_diretorios_brasil__uf')
field: sigla
ignore_values: [GB, GP, RB]
- name: tipo_eleicao
description: Tipo da eleição
- name: turno
Expand Down

0 comments on commit 2441e38

Please sign in to comment.