An end-to-end data engineering and model governance pipeline built to ensure regulatory compliance, data quality, and drift detection. This system processes credit risk data, isolates anomalous transactions, and monitors data distribution over time.
Read the architectural breakdown and the governance design on Medium:
- Building an Auditable Data Pipeline: Implementing NIST RMF and EU AI Act Controls for Responsible AI
The pipeline processes data through three distinct layers to maintain auditability and data integrity:
- Bronze Layer: Ingestion of raw, untrusted data.
- Silver Layer: Cleaned, governed, and validated data ready for consumption.
- Quarantine Layer: Isolated records that fail governance rules.
This pipeline implements the following controls:
- Great Expectations: Enforces schema contracts and bounds rules.
- Evidently AI: Monitors continuous dataset drift.
- Audit Trails: Generates documentation necessary for NIST AI RMF and EU AI Act compliance.
flowchart LR
A[Source Systems<br/>Databases β’ APIs β’ Streams β’ Files] --> B[Ingestion & Orchestration<br/>ETL/ELT β’ Schedulers β’ Connectors]
B --> C[Bronze Layer<br/>Raw β’ Untrusted β’ Immutable]
C -->|Validation Pass| D[Silver Layer<br/>Cleaned β’ Governed β’ Validated]
C -->|Validation Fail| E[Quarantine Layer<br/>Failed Records β’ Error Context]
E -->|Remediation / Reprocess| C
subgraph Governance & Monitoring
GE[Great Expectations<br/>Schema Contracts β’ Rules]
EV[Evidently AI<br/>Drift Monitoring]
AT[Audit Trails<br/>Lineage β’ Logs β’ Compliance]
end
GE --> C
GE --> D
EV --> C
EV --> D
AT --> C
AT --> D
AT --> E
D --> F[Downstream Consumers<br/>BI β’ ML β’ Analytics β’ Data Products]
auditable-data-pipeline-governance/
βββ app.py # Main governance application
βββ data_generator.py # Generates sample credit data with intentional issues
βββ data_generator_2.py # Additional data generator
βββ governance_gatekeeper.py # Core governance validation logic
βββ initialize_gx.py # Great Expectations context initialization
βββ evidently_ai.py # Data drift detection and reporting
βββ data/
β βββ bronze/ # Raw, unvalidated data
β β βββ credit_data.csv
β βββ silver/ # Validated, governed data
β β βββ credit_data_governed.csv
β β βββ reference_data.csv
β β βββ data_drift_report.html
β βββ quarantine/ # Failed records isolated for review
β βββ failed_records.csv
βββ notebooks/ # Jupyter notebooks for exploration
βββ tests/ # Test suite
This project implements a production-grade multi-layer data storage Medallion Architecture:
- Bronze Layer: Contains the raw, untrusted incoming datasets (data/bronze/).
- Silver Layer: Contains the cleaned, governed, and quality-checked data that is safe for analysis (data/silver/).
- Quarantine Layer: Stores rejected or anomalous records, supporting traceability and audit trails (data/quarantine/).
Source System β Bronze Layer β Governance Gatekeeper β Silver Layer (Valid)
β
Quarantine Layer (Invalid)
This project aligns with major regulatory and standards frameworks for AI and data governance:
The project implements the following NIST AI RMF functions:
-
Measure: Great Expectations provides quantitative metrics for data quality, completeness, and validity. Each validation run produces detailed pass/fail statistics and error rates that can be tracked over time.
-
Monitor: Evidently AI enables continuous monitoring for data drift and distribution changes. The system generates automated HTML reports comparing reference baselines against current data, ensuring ongoing model performance and data integrity.
This pipeline addresses EU AI Act requirements through:
-
Data Minimization & PII Protection: Sensitive consumer attributes and personally identifiable information (PII) are isolated in the Quarantine layer when they fail validation. Only validated, cleaned data proceeds to the Silver layer.
-
Auditability: Complete audit trail of all data quality checks, validation results, and data transformations. Each record's journey from Bronze β Silver β Quarantine is traceable.
-
Explainability: Governance rules are explicitly defined as Great Expectations "expectations" with clear documentation of what constitutes valid vs. invalid data.
-
Fairness: Data quality checks ensure consistent treatment of records, preventing bias from incomplete or erroneous data from entering downstream models.
The following table maps the projectβs reporting tooling to both the NIST AI RMF functions and the EU AI Act requirements:
| Report Type | NIST AI RMF Function | EU AI Act Requirement |
|---|---|---|
| Great Expectations | Measure: Programmatic validation of data quality and integrity. | Data Governance: Ensuring high-quality datasets through rigorous validation and error handling. |
| Evidently AI | Monitor: Ongoing oversight of model input stability and performance. | Transparency & Traceability: Maintaining a clear audit trail of how data evolved throughout the system lifecycle. |
This section clearly outlines the testing and monitoring tools used in the pipeline:
- The
credit_governance_suiteautomatically enforces constraints on core features. - It ensures
credit_amountvalues remain positive and bounded, andduration_monthsvalues stay within allowed business limits. - This suite enforces those constraints as part of the governance validation step.
- Evidently AI generates a drift detection report that summarizes shifts in the data population.
- The report compares current governed data against the reference dataset to identify changes on key features.
- It tracks population shifts for:
checking_statusduration_monthscredit_amountage
- When drift is detected, the report highlights deviations from the expected reference distribution.
- Python 3.9+
- Conda or virtual environment manager
git
git clone [https://github.com/vrrgithub1/auditable-data-pipeline-governance.git](https://github.com/vrrgithub1/auditable-data-pipeline-governance.git)
cd auditable-data-pipeline-governance
pip install -r requirements.txt-
- Initialize data context:
python initialize_gx.py-
- Run data generator and validation:
python data_generator.py-
- Run the drift detection report:
python evidently_ai.py- Python 3.9+
- Conda environment:
governance_pipeline - Dependencies:
pip install -r requirements.txt(or specify evident/Great Expectations installs)
-
Initialize Great Expectations:
python initialize_gx.py
-
Generate the governed datasets and run validation checks:
python data_generator.py
-
Generate the Evidently Data Drift Report:
python evidently_ai.py
Sets up the Great Expectations context and creates the Medallion Architecture folder structure.
Core validation engine that:
- Defines governance rules (expectations)
- Validates data against rules
- Routes clean data to Silver layer
- Quarantines failed records
Monitors for data distribution changes by comparing:
- Reference dataset (baseline)
- Current dataset (new data)
Generates HTML drift reports for visualization.
Orchestrates the entire governance workflow:
- Setup governance suite with rules
- Create data source and assets
- Load and validate Bronze data
- Generate validation results
- Python 3.9+
- Conda or virtual environment manager
- Clone the repository and navigate to the project directory.
- Create and activate the environment:
conda create -n governance_pipeline python=3.10 -y conda activate governance_pipeline
- Install the required packages:
pip install -r requirements.txt
- Initialize Data Context:
python initialize_gx.py
- Generate and Govern Data:
python data_generator.py
- Run Monitoring Suite:
python evidently_ai.py
The system enforces the following data quality rules:
| Rule | Description | Column |
|---|---|---|
| Positive Values | Credit amount must be greater than 0 | credit_amount |
| Valid Duration | Duration in months must be between 1 and 72 | duration_months |
Bronze (Raw) β Governance Gatekeeper β Silver (Governed)
β β
Quarantine Validated Data
- Validation Results: Detailed pass/fail status for each record
- Drift Report: HTML report showing data distribution changes
- Audit Trail: Complete history of data quality checks
The project includes major visual artifacts that document the governance and monitoring results:
This report visually summarizes population shifts against the reference dataset and highlights drift on key features.
This dashboard displays the validation suite status and governance checks for the credit dataset.
Improvements to the pipeline, such as:
- Automating orchestration with tools like Prefect or Apache Airflow.
- Adding an automated model training stage that retrains on governed data only when drift is detected.
This project is licensed under the MIT License.
Copyright (c) 2026 Venkat Rajadurai
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

