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

[dbt]: fix br_bd_diretorios_brasil.setor_censitario_{2010, 2022} #561

Merged
merged 3 commits into from
Jul 2, 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 @@ -43,5 +43,7 @@ left join
`basedosdados.br_bd_diretorios_brasil.municipio` as b
on a.id_municipio = b.id_municipio
left join
`basedosdados.br_bd_diretorios_brasil.distrito` as c
(
select * from `basedosdados.br_bd_diretorios_brasil.distrito` where ano = 2010
) as c
on a.id_distrito = c.id_distrito
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ with
safe_cast(cd_uf as string) as id_uf,
safe_cast(cd_mun as string) as id_municipio,
safe_cast(cd_dist as string) as id_distrito,
safe_cast(nm_dist as string) as nome_distrito,
safe_cast(cd_subdist as string) as id_subdistrito,
safe_cast(nm_subdist as string) as nome_subdistrito,
safe_cast(cd_micro as string) as id_microrregiao,
Expand All @@ -37,7 +38,7 @@ select
a.id_municipio,
c.nome as nome_municipio,
a.id_distrito,
d.nome as nome_distrito,
a.nome_distrito,
id_subdistrito,
nome_subdistrito,
a.id_microrregiao,
Expand All @@ -56,6 +57,3 @@ left join `basedosdados.br_bd_diretorios_brasil.uf` as b on a.id_uf = b.id_uf
left join
`basedosdados.br_bd_diretorios_brasil.municipio` as c
on a.id_municipio = c.id_municipio
left join
`basedosdados.br_bd_diretorios_brasil.distrito` as d
on a.id_distrito = d.id_distrito
Loading