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

br_inep_ideb.brasil: fix col rede #720

Merged
merged 3 commits into from
Aug 6, 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
15 changes: 15 additions & 0 deletions models/br_inep_ideb/br_inep_ideb__brasil.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{ config(alias="brasil", schema="br_inep_ideb", materialized="table") }}

select
safe_cast(ano as int64) ano,
safe_cast(if(rede = "pública", "publica", rede) as string) rede,
safe_cast(ensino as string) ensino,
safe_cast(anos_escolares as string) anos_escolares,
safe_cast(taxa_aprovacao as float64) taxa_aprovacao,
safe_cast(indicador_rendimento as float64) indicador_rendimento,
safe_cast(nota_saeb_matematica as float64) nota_saeb_matematica,
safe_cast(nota_saeb_lingua_portuguesa as float64) nota_saeb_lingua_portuguesa,
safe_cast(nota_saeb_media_padronizada as float64) nota_saeb_media_padronizada,
safe_cast(ideb as float64) ideb,
safe_cast(projecao as float64) projecao
from `basedosdados-staging.br_inep_ideb_staging.brasil` as t
43 changes: 43 additions & 0 deletions models/br_inep_ideb/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,46 @@ models:
description: IDEB (Média Padronizada x Indicador de rendimento)
- name: projecao
description: Projeção
- name: br_inep_ideb__brasil
description: Dados do Ideb agregados para o Brasil a nível de rede-anos_escolares-ano
tests:
- dbt_utils.unique_combination_of_columns:
combination_of_columns: [ano, rede, ensino, anos_escolares]
- not_null_proportion_multiple_columns:
at_least: 0.7
columns:
- name: ano
description: Ano
tests:
- relationships:
to: ref('br_bd_diretorios_data_tempo__ano')
field: ano.ano
- name: rede
description: Rede Escolar (Dependência Administrativa)
tests:
- accepted_values:
values: [estadual, municipal, privada, publica, total]
- name: ensino
description: Tipo de Ensino
tests:
- accepted_values:
values: [fundamental, medio]
- name: anos_escolares
description: Anos Escolares
tests:
- accepted_values:
values: [iniciais (1-5), finais (6-9), todos (1-4)]
- name: taxa_aprovacao
description: Taxa de Aprovação
- name: indicador_rendimento
description: Indicador de Rendimento (P)
- name: nota_saeb_matematica
description: Nota SAEB - Matemática
- name: nota_saeb_lingua_portuguesa
description: Nota SAEB - Língua Portuguesa
- name: nota_saeb_media_padronizada
description: Nota SAEB - Média Padronizada (N)
- name: ideb
description: IDEB (Nota SAEB - Média Padronizada x Indicador de Rendimento)
- name: projecao
description: Projeção
Loading