test: adicionar testes para a tabela de orçamento do sistema ipea/orcamento_dbt#378
Open
bitterteriyaki wants to merge 3 commits into
Open
test: adicionar testes para a tabela de orçamento do sistema ipea/orcamento_dbt#378bitterteriyaki wants to merge 3 commits into
ipea/orcamento_dbt#378bitterteriyaki wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
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, andvalor_nao_negativo) to orçamento silver model schemas. - Introduced a custom generic dbt test macro to assert non-negative numeric values.
- Updated
.gitignoreto 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 %} |
Merged
13 tasks
c78e525 to
ac5dedd
Compare
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Descrição
Resolve a issue #303.
Tipo de mudança
Issues relacionadas
Closes #303
Como testar / validar
Evidências
Checklist
upstream/mainouorigin/main