Skip to content

Commit

Permalink
Merge branches 'staging/update_caged_models' and 'staging/update_cage…
Browse files Browse the repository at this point in the history
…d_models' of https://github.com/basedosdados/staging-queries-basedosdados into staging/update_caged_models
  • Loading branch information
folhesgabriel committed Nov 28, 2024
2 parents 5b17469 + c6df21c commit 9abd401
Show file tree
Hide file tree
Showing 16 changed files with 5,990 additions and 509 deletions.
818 changes: 409 additions & 409 deletions dbt_project.yml

Large diffs are not rendered by default.

Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
)
}}
select
safe_cast(municipio_codigo_ as string) id_municipio,
safe_cast(cor_ou_raca as string) cor_raca,
safe_cast(munic_pio__c_digo_ as string) id_municipio,
safe_cast(cor_ou_ra_a as string) cor_raca,
safe_cast(sexo as string) sexo,
safe_cast(idade as string) grupo_idade,
safe_cast(alfabetizacao as string) alfabetizacao,
safe_cast(alfabetiza__o as string) alfabetizacao,
safe_cast(valor as int64) populacao,
from
`basedosdados-staging.br_ibge_censo_2022_staging.alfabetizacao_grupo_idade_sexo_raca`
Expand Down
4 changes: 2 additions & 2 deletions models/br_ibge_censo_2022/br_ibge_censo_2022__municipio.sql
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ with
alfabetizacao as (
select
2022 as ano,
safe_cast(municipio_codigo_ as string) id_municipio,
safe_cast(munic_pio__c_digo_ as string) id_municipio,
round(
sum(if(alfabetizacao = 'Alfabetizadas', safe_cast(valor as int64), 0))
sum(if(alfabetiza__o = 'Alfabetizadas', safe_cast(valor as int64), 0))
/ sum(safe_cast(valor as int64)),
5
) as taxa_alfabetizacao
Expand Down
Loading

0 comments on commit 9abd401

Please sign in to comment.