Skip to content

Commit

Permalink
Merge pull request #342 from basedosdados/staging/br_camara_dados_abe…
Browse files Browse the repository at this point in the history
…rtos

[dbt] br_camara_dados_abertos
  • Loading branch information
gabrielle-carv authored Oct 25, 2023
2 parents 1e41c22 + b297e7d commit 295f73a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ SELECT
SAFE_CAST(ano AS INT64) ano,
SAFE_CAST(id_votacao AS STRING) id_votacao,
SAFE_CAST(data AS DATE) data,
SAFE_CAST(horario AS TIME) horario,
TIME(TIMESTAMP(horario)) AS horario
SAFE_CAST(id_orgao AS STRING) id_orgao,
SAFE_CAST(sigla_orgao AS STRING) sigla_orgao,
SAFE_CAST(id_evento AS STRING) id_evento,
SAFE_CAST(aprovacao AS INT64) aprovacao,
SAFE_CAST(REPLACE(aprovacao, ".0", "") AS INT64) aprovacao,
SAFE_CAST(voto_sim AS INT64) voto_sim,
SAFE_CAST(voto_nao AS INT64) voto_nao,
SAFE_CAST(voto_outro AS INT64) voto_outro,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ SELECT
SAFE_CAST(data AS DATE) data,
SAFE_CAST(descricao AS STRING) descricao,
SAFE_CAST(id_proposicao AS STRING) id_proposicao,
SAFE_CAST(ano_proposicao AS INT64) ano_proposicao,
SAFE_CAST(REPLACE(ano_proposicao, ".0", "") AS INT64) ano_proposicao,
SAFE_CAST(ementa AS STRING) ementa,
SAFE_CAST(codigo_tipo AS STRING) codigo_tipo,
SAFE_CAST(sigla_tipo AS STRING) sigla_tipo,
SAFE_CAST(numero AS STRING) numero,
SAFE_CAST(REPLACE(numero, ".0", "") AS STRING) numero,
SAFE_CAST(titulo AS STRING) titulo
FROM basedosdados-dev.br_camara_dados_abertos_staging.votacao_objeto AS t
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ SELECT
SAFE_CAST(data AS DATE) data,
SAFE_CAST(descricao AS STRING) descricao,
SAFE_CAST(id_proposicao AS STRING) id_proposicao,
SAFE_CAST(ano_proposicao AS INT64) ano_proposicao,
SAFE_CAST(REPLACE(ano_proposicao, ".0", "") AS INT64) ano_proposicao,
SAFE_CAST(titulo AS STRING) titulo,
SAFE_CAST(ementa AS STRING) ementa,
SAFE_CAST(codigo_tipo AS STRING) codigo_tipo,
SAFE_CAST(sigla_tipo AS STRING) sigla_tipo,
SAFE_CAST(numero AS STRING) numero,
SAFE_CAST(REPLACE(numero, ".0", "") AS STRING) numero,
FROM basedosdados-dev.br_camara_dados_abertos_staging.votacao_proposicao_afetada AS t
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ SELECT
SAFE_CAST(id_votacao AS STRING) id_votacao,
SAFE_CAST(data_hora AS DATETIME) data_hora,
SAFE_CAST(voto AS STRING) voto,
SAFE_CAST(id_deputado AS STRING) id_deputado,
SAFE_CAST(REPLACE(id_deputado, ".0", "") AS STRING) id_deputado,
SAFE_CAST(nome AS STRING) nome,
SAFE_CAST(sigla_partido AS STRING) sigla_partido,
SAFE_CAST(sigla_uf AS STRING) sigla_uf,
Expand Down

0 comments on commit 295f73a

Please sign in to comment.