Skip to content

Commit

Permalink
[dbt]br_tse_eleicoes - Atualizar dados 2024 TSE (#842)
Browse files Browse the repository at this point in the history
Atualizar dados 2024 TSE
  • Loading branch information
Winzen authored Dec 19, 2024
1 parent 418e985 commit 9738c4e
Show file tree
Hide file tree
Showing 9 changed files with 129 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@
partition_by={
"field": "ano",
"data_type": "int64",
"range": {"start": 1994, "end": 2022, "interval": 2},
"range": {"start": 1994, "end": 2024, "interval": 2},
},
cluster_by=["sigla_uf"],
)
}}

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 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
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@
partition_by={
"field": "ano",
"data_type": "int64",
"range": {"start": 1994, "end": 2022, "interval": 2},
"range": {"start": 1994, "end": 2024, "interval": 2},
},
cluster_by=["sigla_uf"],
)
}}

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 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
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@
partition_by={
"field": "ano",
"data_type": "int64",
"range": {"start": 1994, "end": 2022, "interval": 2},
"range": {"start": 1994, "end": 2024, "interval": 2},
},
cluster_by=["sigla_uf"],
)
}}

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 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
2 changes: 1 addition & 1 deletion models/br_tse_eleicoes/br_tse_eleicoes__partidos.sql
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": 1990, "end": 2022, "interval": 2},
"range": {"start": 1990, "end": 2024, "interval": 2},
},
cluster_by=["sigla_uf"],
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
partition_by={
"field": "ano",
"data_type": "int64",
"range": {"start": 2016, "end": 2022, "interval": 2},
"range": {"start": 2016, "end": 2024, "interval": 2},
},
cluster_by=["sigla_uf"],
)
}}

select
safe_cast(ano as int64) ano,
safe_cast(turno as int64) turno,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
partition_by={
"field": "ano",
"data_type": "int64",
"range": {"start": 1998, "end": 2022, "interval": 2},
"range": {"start": 1998, "end": 2024, "interval": 2},
},
cluster_by=["sigla_uf"],
)
}}

select
safe_cast(ano as int64) ano,
safe_cast(sigla_uf as string) sigla_uf,
Expand Down
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": 2008, "end": 2022, "interval": 2},
"range": {"start": 2008, "end": 2024, "interval": 2},
},
cluster_by=["sigla_uf"],
)
Expand Down
4 changes: 2 additions & 2 deletions models/br_tse_eleicoes/br_tse_eleicoes__vagas.sql
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": 1994, "end": 2022, "interval": 2},
"range": {"start": 1994, "end": 2024, "interval": 2},
},
cluster_by=["sigla_uf"],
)
Expand All @@ -15,7 +15,7 @@ select
safe_cast(ano as int64) ano,
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
Loading

0 comments on commit 9738c4e

Please sign in to comment.