-
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 update-br-inep-sinopse-educacao-basica
- Loading branch information
Showing
25 changed files
with
636 additions
and
39 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
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
29 changes: 29 additions & 0 deletions
29
models/br_cgu_beneficios_cidadao/br_cgu_beneficios_cidadao__auxilio_brasil.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,29 @@ | ||
{{ | ||
config( | ||
alias="auxilio_brasil", | ||
schema="br_cgu_beneficios_cidadao", | ||
materialized="table", | ||
partition_by={ | ||
"field": "ano_competencia", | ||
"data_type": "int64", | ||
"range": { | ||
"start": 2020, | ||
"end": 2023, | ||
"interval": 1, | ||
}, | ||
}, | ||
cluster_by=["sigla_uf", "id_municipio"], | ||
) | ||
}} | ||
select distinct | ||
safe_cast(split(mes_ref, '-')[offset(0)] as int64) as ano_competencia, | ||
safe_cast(split(mes_ref, '-')[offset(1)] as int64) as mes_competencia, | ||
safe_cast(left(mes, 4) as int64) ano_referencia, | ||
safe_cast(right(mes, 2) as int64) mes_referencia, | ||
safe_cast(id_municipio as string) id_municipio, | ||
safe_cast(sigla_uf as string) sigla_uf, | ||
case when cpf = '' then null else cpf end as cpf_favorecido, | ||
safe_cast(nis as string) nis_favorecido, | ||
safe_cast(nome as string) nome_favorecido, | ||
safe_cast(valor_beneficio as float64) valor_parcela, | ||
from `basedosdados-staging.br_cgu_beneficios_cidadao_staging.auxilio_brasil` as t |
32 changes: 32 additions & 0 deletions
32
models/br_cgu_beneficios_cidadao/br_cgu_beneficios_cidadao__bolsa_familia_pagamento.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,32 @@ | ||
{{ | ||
config( | ||
alias="bolsa_familia_pagamento", | ||
schema="br_cgu_beneficios_cidadao", | ||
materialized="table", | ||
partition_by={ | ||
"field": "ano_competencia", | ||
"data_type": "int64", | ||
"range": { | ||
"start": 2020, | ||
"end": 2023, | ||
"interval": 1, | ||
}, | ||
}, | ||
cluster_by=["sigla_uf", "id_municipio"], | ||
) | ||
}} | ||
|
||
select distinct | ||
safe_cast(split(mes_ref, '-')[offset(0)] as int64) as ano_competencia, | ||
safe_cast(split(mes_ref, '-')[offset(1)] as int64) as mes_competencia, | ||
safe_cast(left(mes, 4) as int64) ano_referencia, | ||
safe_cast(right(mes, 2) as int64) mes_referencia, | ||
safe_cast(id_municipio as string) id_municipio, | ||
safe_cast(sigla_uf as string) sigla_uf, | ||
case when cpf = '' then null else cpf end as cpf_favorecido, | ||
safe_cast(nis as string) nis_favorecido, | ||
safe_cast(nome as string) nome_favorecido, | ||
safe_cast(valor_beneficio as float64) valor_parcela, | ||
from | ||
`basedosdados-staging.br_cgu_beneficios_cidadao_staging.bolsa_familia_pagamento` | ||
as t |
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
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
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
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
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
1 change: 0 additions & 1 deletion
1
models/br_cgu_dados_abertos/br_cgu_dados_abertos__organizacao.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
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
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
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
Oops, something went wrong.