# ayabenmeftah84-rgb/data-quality-pipeline architecture

> Architecture diagram of the GitHub repository ayabenmeftah84-rgb/data-quality-pipeline, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ayabenmeftah84-rgb/data-quality-pipeline
- Repository: https://github.com/ayabenmeftah84-rgb/data-quality-pipeline

## Overview

This is a Spark-based data-quality pipeline for Inside Airbnb listings. The main workflow is launched by the pipeline runner, which profiles raw listings, cleans them into accepted and quarantined datasets, then validates raw and cleaned data against shared rules. Separate analysis branches explore suspected issues and inject synthetic errors to measure detection. Edges reflect the runner’s subprocess dispatch, explicit source calls and documented data flow; input data and generated artifacts are not repository source files.

Main entry points: [`src/evaluate_detection.py`](https://github.com/ayabenmeftah84-rgb/data-quality-pipeline/blob/master/src/evaluate_detection.py) (Detection experiment), [`src/clean_data.py`](https://github.com/ayabenmeftah84-rgb/data-quality-pipeline/blob/master/src/clean_data.py) (Cleaning job), [`src/validate_data.py`](https://github.com/ayabenmeftah84-rgb/data-quality-pipeline/blob/master/src/validate_data.py) (Rule validation), [`src/run_pipeline.py`](https://github.com/ayabenmeftah84-rgb/data-quality-pipeline/blob/master/src/run_pipeline.py) (Pipeline runner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Pipeline orchestration"]
  node_pipeline_runner["Pipeline runner<br/>[run_pipeline.py]"]
end

subgraph group_analysis["Data analysis"]
  node_profiling["Data profiling<br/>[profile_data.py]"]
  node_issue_explorer["Issue exploration<br/>[explore_issues.py]"]
end

subgraph group_processing["Cleaning and quarantine"]
  node_clean_entry["Cleaning job<br/>[clean_data.py]"]
  node_clean_logic["Cleaning rules<br/>[cleaning.py]"]
  node_clean_store[("Clean listings")]
  node_quarantine_store[("Quarantined listings")]
  node_cleaning_log["Cleaning log"]
end

subgraph group_assurance["Validation and experiments"]
  node_validation["Rule validation<br/>[validate_data.py]"]
  node_validation_report["Validation report"]
  node_detection_runner["Detection experiment"]
  node_error_injector["Error injection<br/>[error_injection.py]"]
  node_injection_report["Detection report"]
end

node_raw_listings[("Raw listings")]

node_pipeline_runner -->|"launches"| node_profiling
node_pipeline_runner -->|"launches"| node_clean_entry
node_pipeline_runner -->|"launches"| node_validation
node_profiling -->|"reads"| node_raw_listings
node_issue_explorer -->|"reads"| node_raw_listings
node_clean_entry -->|"reads"| node_raw_listings
node_clean_entry -->|"calls"| node_clean_logic
node_clean_entry -->|"writes"| node_clean_store
node_clean_entry -->|"writes"| node_quarantine_store
node_clean_entry -->|"writes"| node_cleaning_log
node_validation -->|"reads"| node_raw_listings
node_validation -->|"reads"| node_clean_store
node_validation -->|"writes"| node_validation_report
node_detection_runner -->|"reads"| node_raw_listings
node_detection_runner -->|"reads"| node_clean_store
node_detection_runner -->|"reads"| node_quarantine_store
node_detection_runner -->|"reads"| node_cleaning_log
node_detection_runner -->|"calls"| node_error_injector
node_detection_runner -->|"calls"| node_clean_logic
node_detection_runner -->|"writes"| node_injection_report

click node_pipeline_runner "https://github.com/ayabenmeftah84-rgb/data-quality-pipeline/blob/master/src/run_pipeline.py"
click node_profiling "https://github.com/ayabenmeftah84-rgb/data-quality-pipeline/blob/master/src/profile_data.py"
click node_issue_explorer "https://github.com/ayabenmeftah84-rgb/data-quality-pipeline/blob/master/src/explore_issues.py"
click node_clean_entry "https://github.com/ayabenmeftah84-rgb/data-quality-pipeline/blob/master/src/clean_data.py"
click node_clean_logic "https://github.com/ayabenmeftah84-rgb/data-quality-pipeline/blob/master/src/cleaning.py"
click node_validation "https://github.com/ayabenmeftah84-rgb/data-quality-pipeline/blob/master/src/validate_data.py"
click node_detection_runner "https://github.com/ayabenmeftah84-rgb/data-quality-pipeline/blob/master/src/evaluate_detection.py"
click node_error_injector "https://github.com/ayabenmeftah84-rgb/data-quality-pipeline/blob/master/src/error_injection.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_pipeline_runner toneBlue
class node_profiling,node_issue_explorer,node_raw_listings toneAmber
class node_clean_entry,node_clean_logic,node_clean_store,node_quarantine_store,node_cleaning_log toneMint
class node_validation,node_validation_report,node_detection_runner,node_error_injector,node_injection_report toneRose
```

## Components

### Pipeline orchestration

- [Pipeline runner](https://github.com/ayabenmeftah84-rgb/data-quality-pipeline/blob/master/src/run_pipeline.py): `src/run_pipeline.py`

### Data analysis

- [Data profiling](https://github.com/ayabenmeftah84-rgb/data-quality-pipeline/blob/master/src/profile_data.py): `src/profile_data.py`
- [Issue exploration](https://github.com/ayabenmeftah84-rgb/data-quality-pipeline/blob/master/src/explore_issues.py): `src/explore_issues.py`

### Cleaning and quarantine

- [Cleaning job](https://github.com/ayabenmeftah84-rgb/data-quality-pipeline/blob/master/src/clean_data.py): `src/clean_data.py`
- [Cleaning rules](https://github.com/ayabenmeftah84-rgb/data-quality-pipeline/blob/master/src/cleaning.py): `src/cleaning.py`
- **Clean listings**
- **Quarantined listings**
- **Cleaning log**

### Validation and experiments

- [Rule validation](https://github.com/ayabenmeftah84-rgb/data-quality-pipeline/blob/master/src/validate_data.py): `src/validate_data.py`
- **Validation report**
- [Detection experiment](https://github.com/ayabenmeftah84-rgb/data-quality-pipeline/blob/master/src/evaluate_detection.py): `src/evaluate_detection.py`
- [Error injection](https://github.com/ayabenmeftah84-rgb/data-quality-pipeline/blob/master/src/error_injection.py): `src/error_injection.py`
- **Detection report**

### Other components

- **Raw listings**

## Connections

- Pipeline runner → Data profiling: launches (evidence: `src/run_pipeline.py`)
- Pipeline runner → Cleaning job: launches (evidence: `src/run_pipeline.py`)
- Pipeline runner → Rule validation: launches (evidence: `src/run_pipeline.py`)
- Data profiling → Raw listings: reads (evidence: `src/profile_data.py`)
- Issue exploration → Raw listings: reads (evidence: `src/explore_issues.py`)
- Cleaning job → Raw listings: reads (evidence: `src/clean_data.py`)
- Cleaning job → Cleaning rules: calls (evidence: `src/clean_data.py`)
- Cleaning job → Clean listings: writes (evidence: `src/clean_data.py`)
- Cleaning job → Quarantined listings: writes (evidence: `src/clean_data.py`)
- Cleaning job → Cleaning log: writes (evidence: `src/clean_data.py`)
- Rule validation → Raw listings: reads (evidence: `src/validate_data.py`)
- Rule validation → Clean listings: reads (evidence: `src/validate_data.py`)
- Rule validation → Validation report: writes (evidence: `src/validate_data.py`)
- Detection experiment → Raw listings: reads (evidence: `src/evaluate_detection.py`)
- Detection experiment → Clean listings: reads (evidence: `src/evaluate_detection.py`)
- Detection experiment → Quarantined listings: reads (evidence: `src/evaluate_detection.py`)
- Detection experiment → Cleaning log: reads (evidence: `src/evaluate_detection.py`)
- Detection experiment → Error injection: calls (evidence: `src/evaluate_detection.py`)
- Detection experiment → Cleaning rules: calls (evidence: `src/evaluate_detection.py`)
- Detection experiment → Detection report: writes (evidence: `src/evaluate_detection.py`)
