Lightweight but production-structured ETL pipeline: generates synthetic sales data with Faker, transforms it in Python, loads into PostgreSQL — all containerized with Docker and validated via automated SQL linting on every push.
Pipeline: Faker → sales.csv → ETL (Python) → PostgreSQL → SQL Analytics → CI/CD (SQLFluff)
What makes it stand out: SQLFluff linting runs automatically on every push via GitHub Actions — SQL formatting is enforced the same way code style is in real engineering teams.
generate_data.py → sales.csv → etl.py → PostgreSQL (sales table)
↓
sql/dql/ queries
↓
GitHub Actions (sqlfluff lint)
SELECT
category,
COUNT(*) AS total_orders,
ROUND(SUM(total)::numeric, 2) AS revenue
FROM sales
GROUP BY category
ORDER BY revenue DESC
LIMIT 5;SELECT
DATE_TRUNC('week', date::date) AS week_start,
COUNT(*) AS total_orders,
ROUND(SUM(total)::numeric, 2) AS total_revenue
FROM sales
GROUP BY week_start
ORDER BY week_start;WITH category_revenue AS (
SELECT
category,
COUNT(*) AS total_orders,
ROUND(SUM(total)::numeric, 2) AS revenue
FROM sales
GROUP BY category
)
SELECT
category,
total_orders,
revenue,
RANK() OVER (ORDER BY revenue DESC) AS rank,
ROUND(revenue / SUM(revenue) OVER () * 100, 1) AS pct_of_total
FROM category_revenue
ORDER BY rank;Every push and pull request triggers:
sqlfluff lint sql/dql --dialect postgresSQL formatting is automatically validated — same engineering standard used in production data teams.
data-pipeline-etl-project/
├── scripts/
│ ├── etl.py # Extract → Transform → Load
│ ├── generate_data.py # Synthetic sales data (Faker)
│ └── clean_sql_files.py # Auto-fix SQL formatting
├── sql/
│ └── dql/
│ ├── top_categories.sql
│ ├── sales_by_region.sql
│ ├── discount_impact.sql
│ ├── daily_sales_trend.sql
│ └── weekly_sales_trend.sql
├── data/
│ └── raw/sales.csv
├── .github/workflows/
│ └── sql-lint.yaml # SQLFluff CI/CD workflow
├── docker-compose.yaml
├── Dockerfile
└── requirements.txt
# 1. Clone the repo
git clone https://github.com/evgeniimatveev/data-pipeline-etl-project.git
cd data-pipeline-etl-project
# 2. Start containers and run ETL
docker-compose up --build
# Output: Data successfully loaded into the 'sales' table.
# 3. Run SQL queries in DBeaver or psql
# Connect to localhost:5432, database: sales_db| Layer | Technology |
|---|---|
| Data Generation | Python (Faker) |
| ETL Logic | Python (pandas, psycopg2) |
| Database | PostgreSQL |
| Containerization | Docker + Docker Compose |
| SQL Quality | SQLFluff (automated linting) |
| CI/CD | GitHub Actions |
- GitHub: evgeniimatveev
- Portfolio: datascienceportfol.io/evgeniimatveevusa
- LinkedIn: Evgenii Matveev