| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [View Raw Code] [Original HTTPS Page] |
This increment demonstrates a small, reproducible Data/BI preparation workflow rather than a production ETL platform. It turns a deliberately imperfect synthetic CSV into four auditable outputs:
The implementation is intentionally separated into reusable functions so validation and transformation logic can be tested independently from file-system export.
The raw CSV must contain these columns:
| Column | Rule |
|---|---|
| result_id | Required, unique after exact-duplicate handling |
| learner_id | Required |
| module | Required; surrounding and repeated whitespace is normalised |
| assessment_date | Required ISO date in YYYY-MM-DD format |
| score | Numeric, at least zero and not above max_score |
| max_score | Numeric and greater than zero |
| pass_score | Numeric, at least zero and not above max_score |
Unexpected columns are ignored but listed in quality_report.json.
The workflow performs the following steps in a fixed order:
Invalid rows are not silently discarded. They remain visible in rejected_results.csv with pipe-separated reason codes.
data/raw/training_results.csv intentionally contains:
The committed raw data is synthetic and contains no personal information.
From the repository root:
python -m data_quality \
--input data/raw/training_results.csv \
--output .ci-output/data-qualityPowerShell uses the same arguments:
python -m data_quality `
--input "data/raw/training_results.csv" `
--output ".ci-output/data-quality"The .ci-output/ directory is already ignored by Git.
The committed fixture contains 15 input rows. The expected workflow result is 8 analysis-ready rows and 7 rejected rows, including the later copy of the exact duplicate.
Expected module KPI control values include:
| Module | Results | Average score | Pass rate |
|---|---|---|---|
| Data Quality | 2 | 71.50% | 50.00% |
| Process Analysis | 2 | 55.00% | 50.00% |
| Python Basics | 1 | 75.00% | 100.00% |
| SQL Basics | 3 | 77.33% | 66.67% |
| File | Purpose |
|---|---|
| cleaned_results.csv | Normalised and validated analysis-ready records |
| rejected_results.csv | Original row values plus explicit rejection reasons |
| module_kpis.csv | Result count, learner count, average score, pass/fail counts and pass rate |
| quality_report.json | Row counts, acceptance rate, duplicate metrics and rejection-reason counts |
A missing input file or missing required column stops the workflow with a non-zero exit code. Row-level quality problems do not crash the workflow; they are isolated in the rejection output and summarised in the report.
This is a learning-grade quality workflow for small CSV files. It does not claim streaming ingestion, distributed processing, schema evolution, database transactions, orchestration, production observability or regulatory validation.
| Back | FazBrowse Home | New Git URL |