Skip to content

Commit

Permalink
Merge pull request #528 from basedosdados/feat/censo-setor-censitario
Browse files Browse the repository at this point in the history
[fix]: fix rm table
  • Loading branch information
arthurfg authored Apr 4, 2024
2 parents e408dd9 + 866fb85 commit 7bc53a0
Showing 1 changed file with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
materialized="table",
)
}}

with
censo_2022 as (
select
Expand Down Expand Up @@ -39,7 +40,20 @@ with

censo_2010 as (
select
*,
safe_cast(ano as int64) ano,
safe_cast(id_setor_censitario as string) id_setor_censitario,
safe_cast(id_municipio as string) id_municipio,
safe_cast(id_rm as string) id_rm,
safe_cast(nome_rm as string) nome_rm,
safe_cast(id_distrito as string) id_distrito,
safe_cast(nome_distrito as string) nome_distrito,
safe_cast(id_subdistrito as string) id_subdistrito,
safe_cast(nome_subdistrito as string) nome_subdistrito,
safe_cast(id_bairro as string) id_bairro,
safe_cast(nome_bairro as string) nome_bairro,
safe_cast(sigla_uf as string) sigla_uf,
safe_cast(situacao_setor as string) situacao_setor,
safe_cast(tipo_setor as string) tipo_setor,
cast(null as string) id_microrregiao,
cast(null as string) nome_microrregiao,
cast(null as string) id_mesorregiao,
Expand All @@ -50,7 +64,7 @@ with
cast(null as string) nome_regiao_intermediaria,
cast(null as string) id_concentracao_urbana,
cast(null as string) nome_concentracao_urbana
from `basedosdados-staging.br_bd_diretorios_brasil.setor_censitario`
from `basedosdados-staging.br_bd_diretorios_brasil_staging.setor_censitario`
)

select *
Expand Down

0 comments on commit 7bc53a0

Please sign in to comment.