Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix]: fix rm table #528

Merged
merged 2 commits into from
Apr 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading