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] br_bd_diretorios #672

Merged
merged 2 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
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 @@ -11,7 +11,7 @@ with
select
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_regiao_metropolitana,
safe_cast(id_regiao_metropolitana as string) id_regiao_metropolitana,
safe_cast(id_distrito as string) id_distrito,
safe_cast(id_subdistrito as string) id_subdistrito,
safe_cast(nome_subdistrito as string) nome_subdistrito,
Expand All @@ -20,8 +20,7 @@ with
safe_cast(sigla_uf as string) sigla_uf,
safe_cast(situacao_setor as string) situacao_setor,
safe_cast(tipo_setor as string) tipo_setor
from
`basedosdados-staging.br_bd_diretorios_brasil_staging.setor_censitario` as t
from `basedosdados.br_bd_diretorios_brasil.setor_censitario_2010` as t
)

select
Expand All @@ -44,7 +43,5 @@ left join
`basedosdados.br_bd_diretorios_brasil.municipio` as b
on a.id_municipio = b.id_municipio
left join
(
select * from `basedosdados.br_bd_diretorios_brasil.distrito` where ano = 2010
) as c
(select * from `basedosdados.br_bd_diretorios_brasil.distrito_2010`) as c
on a.id_distrito = c.id_distrito
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
{{
config(
alias="uf",
schema="br_bd_diretorios_brasil",
materialized="table",
)
}}

select
safe_cast(id_uf as string) id_uf,
safe_cast(sigla as string) sigla,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
{{
config(
alias="pais",
schema="br_bd_diretorios_mundo",
materialized="table",
cluster_by="sigla_pais_iso3",
)
}}
{{ config(alias="pais", schema="br_bd_diretorios_mundo", materialized="table") }}

select
safe_cast(id_pais_m49 as string) id_pais_m49,
Expand Down
Loading