airajena opened a new pull request, #50: URL: https://github.com/apache/fineract-business-intelligence/pull/50
## Summary Add data-quality tests for the dbt transformation layer : PAR hierarchy, ratio bounds, repayment component sums, waived-vs-charged, no negatives, no future-dated facts, no orphan FKs, no PII leakage, and accepted-value checks on `standard_par_band`. ## What's added - `dbt/tests/` — 11 singular SQL tests (0 rows returned = pass) - `dbt/packages.yml` + `dbt/package-lock.yml` — pins `dbt-utils` 1.4.1 (Apache-2.0) - `dbt/models/marts/_marts.yml` — `dbt_utils.expression_is_true` cross-column tests + `accepted_values` on `standard_par_band` - `dbt/dbt_project.yml` — registers `test-paths: [tests]` - `.rat-excludes` — excludes machine-generated `package-lock.yml` from license header check - `.github/workflows/ci.yml` — adds `dbt deps` to both `compilation-checks` (dbt parse) and `integration-test` (dbt run/test) jobs ## Test plan - 91 dbt tests total, run against a live warehouse - Local: `docker compose up -d fineract-db warehouse extractor dbt && docker compose exec -T extractor python -m extractor.cli backfill && docker compose exec -T dbt dbt deps && docker compose exec -T dbt dbt run && docker compose exec -T dbt dbt test` - CI runs the same, in the existing `integration-test` job - Mutation-tested: inverted `is_par_60` logic → 2 tests caught it immediately (11,879 bad rows) while `dbt run` itself stayed green, proving these catch what `dbt run` alone wouldn't <img width="1565" height="799" alt="image" src="https://github.com/user-attachments/assets/eab2e9ff-2b22-494a-8822-a80fb5253de2" /> <img width="1469" height="814" alt="image" src="https://github.com/user-attachments/assets/621d8e5d-a08b-465c-89ae-15fe27271ebd" /> ## Scope dbt transformation layer only. Superset and RLS test modules will follow in separate PRs. Fixes: [45](https://github.com/apache/fineract-business-intelligence/issues/45) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
