Skip to content

test: adicionar testes para a tabela de orçamento do sistema ipea/orcamento_dbt#378

Open
bitterteriyaki wants to merge 3 commits into
GovHub-br:mainfrom
bitterteriyaki:tests/orcamento-dbt
Open

test: adicionar testes para a tabela de orçamento do sistema ipea/orcamento_dbt#378
bitterteriyaki wants to merge 3 commits into
GovHub-br:mainfrom
bitterteriyaki:tests/orcamento-dbt

Conversation

@bitterteriyaki

@bitterteriyaki bitterteriyaki commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Descrição

Resolve a issue #303.

Tipo de mudança

  • Nova funcionalidade / pipeline
  • Correção de bug ou inconsistência de dados
  • Refatoração de modelo DBT
  • Documentação
  • Infraestrutura / CI
  • Outro: adição de testes

Issues relacionadas

Closes #303

Como testar / validar

# Exemplo: ajuste conforme o tipo de mudança

# Para modelos DBT
cd airflow_lappis/dags/dbt/<projeto>
dbt test --select <nome_do_modelo>

# Para DAGs
airflow dags test <nome_da_dag> <data_execucao>

# Para testes gerais
make lint
make test

Evidências

Checklist

  • Título do PR segue Conventional Commits
  • Issue relacionada foi referenciada
  • Testes/lint foram executados ou a ausência foi justificada
  • Testes DBT adicionados/atualizados, se aplicável
  • Documentação atualizada, se aplicável
  • Sem dados sensíveis ou credenciais no código
  • Branch atualizada com upstream/main ou origin/main

Copilot AI review requested due to automatic review settings June 17, 2026 03:25
@bitterteriyaki bitterteriyaki requested a review from a team as a code owner June 17, 2026 03:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds dbt data-quality coverage for orçamento “silver” models by introducing column-level tests (null/unique/accepted values/non-negative), plus a custom generic test macro, and updates gitignore for local tooling configs.

Changes:

  • Added dbt column tests (not_null, unique, accepted_values, and valor_nao_negativo) to orçamento silver model schemas.
  • Introduced a custom generic dbt test macro to assert non-negative numeric values.
  • Updated .gitignore to ignore Poetry/Mise local TOML configs and cleaned up VPN ignore formatting.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.

File Description
airflow_lappis/dags/dbt/ipea/models/orcamento_dbt/silver/schema.yml Adds/updates dbt model + column tests and renames model entries.
airflow_lappis/dags/dbt/ipea/macros/data_quality/valor_nao_negativo.sql Adds a custom generic dbt test to flag negative values.
.gitignore Ignores additional local config files (Poetry/Mise) and normalizes formatting.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

models:

- name: categoria_gasto_orcamento_total
- name: categoria_gastos_orcamento_total_
- not_null

- name: orcamento_total
- name: orcamento_total_
Comment on lines +1 to +7
{% macro test_valor_nao_negativo(model, column_name) %}
-- Garante que valores orçamentários não possuem inconsistências de sinal,
-- ou seja, devem ser sempre maiores ou iguais a zero.
select {{ column_name }} as valor
from {{ model }}
where {{ column_name }} < 0
{% endmacro %}
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: Implementar testes para ipea/orcamento_dbt

2 participants