How omarjebbari/reddit-airflow-etl-pipeline works
This repository is a Reddit ingestion and analytics pipeline: an Airflow DAG schedules extraction, validation, dbt modeling, and a PostgreSQL load. The pipeline extracts paginated Reddit data, normalizes it, and writes CSV and MinIO Bronze outputs; documented dbt models provide Silver/Gold analytics, with Trino and Metabase as consumption capabilities. The excerpts show the PostgreSQL loader reading the latest Bronze parquet, despite the README describing a Gold load. dbt, Trino, and Metabase implementation details were not sampled, so those links rely on README documentation.
Main entry points: reddit_dag.py Reddit DAG · reddit_pipeline.py Pipeline coordinator · reddit_etl.py Postgres loader · quality_checks.py Data quality checks
Components 16
Orchestration
- Airflow schedule
dags/reddit_dag.py - Reddit DAG
dags/reddit_dag.py
Ingestion
- Pipeline coordinator
pipelines/reddit_pipeline.py - Paginated extraction
etls/reddit_etl.py - Data normalization
etls/reddit_etl.py - CSV snapshots
- MinIO Bronze
Quality
- Data quality checks
etls/quality_checks.py
Analytics
- Silver models
dbt/models/silver/bronze_reddit_posts.sql - Cleaned Silver model
dbt/models/silver/silver_reddit_cleaned.sql - Gold author model
dbt/models/gold/top_authors.sql
Serving
- PostgreSQL serving
- Postgres loader
etls/reddit_etl.py - Trino SQL
trino/etc/catalog/hive.properties - Metabase BI
Other components
- Reddit endpoint
Connections 18
- Airflow schedule → Reddit DAG: schedules
dags/reddit_dag.py - Reddit DAG → Pipeline coordinator: runs extraction
dags/reddit_dag.py - Pipeline coordinator → Paginated extraction: calls
pipelines/reddit_pipeline.py - Paginated extraction → Reddit endpoint: fetches pages
etls/reddit_etl.py - Pipeline coordinator → Data normalization: normalizes
pipelines/reddit_pipeline.py - Pipeline coordinator → CSV snapshots: writes CSV
pipelines/reddit_pipeline.py - Pipeline coordinator → MinIO Bronze: writes parquet
pipelines/reddit_pipeline.py - Reddit DAG → Data quality checks: runs validation
dags/reddit_dag.py - Data quality checks → CSV snapshots: reads snapshot
etls/quality_checks.py - Reddit DAG → Silver models: runs dbt
README.md - Silver models → Cleaned Silver model: models data
README.md - Cleaned Silver model → Gold author model: models data
README.md - Reddit DAG → Postgres loader: runs load task
dags/reddit_dag.py - Postgres loader → MinIO Bronze: reads parquet
etls/reddit_etl.py - Postgres loader → PostgreSQL serving: writes table
etls/reddit_etl.py - Gold author model → Trino SQL: serves queries
README.md - Trino SQL → Metabase BI: supports dashboards
README.md - PostgreSQL serving → Metabase BI: feeds dashboards
README.md