-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into deploy-elementary-report
- Loading branch information
Showing
9 changed files
with
1,358 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...e_estatistica_educacao_basica/br_inep_sinopse_estatistica_educacao_basica__dicionario.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{{ | ||
config( | ||
alias="dicionario", | ||
schema="br_inep_sinopse_estatistica_educacao_basica", | ||
materialized="table", | ||
) | ||
}} | ||
|
||
|
||
select | ||
safe_cast(id_tabela as string) id_tabela, | ||
safe_cast(nome_coluna as string) nome_coluna, | ||
safe_cast(chave as string) chave, | ||
safe_cast(cobertura_temporal as string) cobertura_temporal, | ||
safe_cast(valor as string) valor | ||
from | ||
`basedosdados-staging.br_inep_sinopse_estatistica_educacao_basica_staging.dicionario` | ||
as t |
24 changes: 24 additions & 0 deletions
24
...stica_educacao_basica/br_inep_sinopse_estatistica_educacao_basica__etapa_ensino_serie.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{{ | ||
config( | ||
alias="etapa_ensino_serie", | ||
schema="br_inep_sinopse_estatistica_educacao_basica", | ||
materialized="table", | ||
partition_by={ | ||
"field": "ano", | ||
"data_type": "int64", | ||
"range": {"start": 2007, "end": 2023, "interval": 1}, | ||
}, | ||
cluster_by="sigla_uf", | ||
) | ||
}} | ||
select | ||
safe_cast(ano as int64) ano, | ||
safe_cast(sigla_uf as string) sigla_uf, | ||
safe_cast(id_municipio as string) id_municipio, | ||
safe_cast(rede as string) rede, | ||
safe_cast(etapa_ensino as string) etapa_ensino, | ||
safe_cast(serie as int64) serie, | ||
safe_cast(quantidade_matricula as int64) quantidade_matricula, | ||
from | ||
`basedosdados-staging.br_inep_sinopse_estatistica_educacao_basica_staging.etapa_ensino_serie` | ||
as t |
23 changes: 23 additions & 0 deletions
23
...estatistica_educacao_basica/br_inep_sinopse_estatistica_educacao_basica__faixa_etaria.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{{ | ||
config( | ||
alias="faixa_etaria", | ||
schema="br_inep_sinopse_estatistica_educacao_basica", | ||
materialized="table", | ||
partition_by={ | ||
"field": "ano", | ||
"data_type": "int64", | ||
"range": {"start": 2007, "end": 2023, "interval": 1}, | ||
}, | ||
cluster_by="sigla_uf", | ||
) | ||
}} | ||
select | ||
safe_cast(ano as int64) ano, | ||
safe_cast(sigla_uf as string) sigla_uf, | ||
safe_cast(id_municipio as string) id_municipio, | ||
safe_cast(etapa_ensino as string) etapa_ensino, | ||
safe_cast(faixa_etaria as string) faixa_etaria, | ||
safe_cast(quantidade_matricula as int64) quantidade_matricula, | ||
from | ||
`basedosdados-staging.br_inep_sinopse_estatistica_educacao_basica_staging.faixa_etaria` | ||
as t |
35 changes: 35 additions & 0 deletions
35
..._estatistica_educacao_basica/br_inep_sinopse_estatistica_educacao_basica__localizacao.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{{ | ||
config( | ||
alias="localizacao", | ||
schema="br_inep_sinopse_estatistica_educacao_basica", | ||
materialized="table", | ||
partition_by={ | ||
"field": "ano", | ||
"data_type": "int64", | ||
"range": {"start": 2007, "end": 2023, "interval": 1}, | ||
}, | ||
cluster_by="sigla_uf", | ||
) | ||
}} | ||
select | ||
safe_cast(ano as int64) ano, | ||
safe_cast(sigla_uf as string) sigla_uf, | ||
safe_cast( | ||
case | ||
when id_municipio = "3201705" | ||
then "3201605" | ||
when id_municipio = "4201704" | ||
then "4201604" | ||
when id_municipio = "4201753" | ||
then "4201653" | ||
when id_municipio = "5201703" | ||
then "5201603" | ||
end as string | ||
) id_municipio, | ||
safe_cast(rede as string) rede, | ||
safe_cast(etapa_ensino as string) etapa_ensino, | ||
safe_cast(localizacao as string) localizacao, | ||
safe_cast(quantidade_matricula as int64) quantidade_matricula, | ||
from | ||
`basedosdados-staging.br_inep_sinopse_estatistica_educacao_basica_staging.localizacao` | ||
as t |
24 changes: 24 additions & 0 deletions
24
...statistica_educacao_basica/br_inep_sinopse_estatistica_educacao_basica__sexo_raca_cor.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{{ | ||
config( | ||
alias="sexo_raca_cor", | ||
schema="br_inep_sinopse_estatistica_educacao_basica", | ||
materialized="table", | ||
partition_by={ | ||
"field": "ano", | ||
"data_type": "int64", | ||
"range": {"start": 2007, "end": 2023, "interval": 1}, | ||
}, | ||
cluster_by="sigla_uf", | ||
) | ||
}} | ||
select | ||
safe_cast(ano as int64) ano, | ||
safe_cast(sigla_uf as string) sigla_uf, | ||
safe_cast(id_municipio as string) id_municipio, | ||
safe_cast(etapa_ensino as string) etapa_ensino, | ||
safe_cast(sexo as string) sexo, | ||
safe_cast(raca_cor as string) raca_cor, | ||
safe_cast(quantidade_matricula as int64) quantidade_matricula, | ||
from | ||
`basedosdados-staging.br_inep_sinopse_estatistica_educacao_basica_staging.sexo_raca_cor` | ||
as t |
24 changes: 24 additions & 0 deletions
24
...estatistica_educacao_basica/br_inep_sinopse_estatistica_educacao_basica__tempo_ensino.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{{ | ||
config( | ||
alias="tempo_ensino", | ||
schema="br_inep_sinopse_estatistica_educacao_basica", | ||
materialized="table", | ||
partition_by={ | ||
"field": "ano", | ||
"data_type": "int64", | ||
"range": {"start": 2007, "end": 2023, "interval": 1}, | ||
}, | ||
cluster_by="sigla_uf", | ||
) | ||
}} | ||
select | ||
safe_cast(ano as int64) ano, | ||
safe_cast(sigla_uf as string) sigla_uf, | ||
safe_cast(id_municipio as string) id_municipio, | ||
safe_cast(rede as string) rede, | ||
safe_cast(tempo_ensino as string) tempo_ensino, | ||
safe_cast(etapa_ensino as string) etapa_ensino, | ||
safe_cast(quantidade_matricula as int64) quantidade_matricula, | ||
from | ||
`basedosdados-staging.br_inep_sinopse_estatistica_educacao_basica_staging.tempo_ensino` | ||
as t |
Oops, something went wrong.