How yccs-26/olist-batch-pipeline works
This repository implements a monthly Olist orders ETL pipeline: local order CSVs are partitioned into S3 raw objects, ingested for a selected month into PostgreSQL staging, then classified into clean and quarantine outputs. Batch-month parsing is a shared internal layer; audit records and SQL-defined database structures support operation. The graph combines sampled Python behavior with README-documented capabilities; unsampled implementation details are not inferred beyond those documented relationships.
Main entry points: clean_orders.py Clean processing · ingest_to_staging.py Staging ingestion · ingest_orders.py Monthly uploader · 01_create_stg_orders.sql Staging orders
Components 14
Raw ingestion
- Orders CSV
csvfiles/olist_orders_dataset.csv - Monthly uploader
scripts/ingest_orders.py - S3 raw objects
Staging and quality
- Staging ingestion
scripts/ingest_to_staging.py - Staging orders
sql/DDL/01_create_stg_orders.sql - Timestamp parser
sql/DDL/02_create_try_parse_timestamp_function.sql - Quality classification
sql/DDL/03_clean_quarantine_orders.sql - Clean processing
scripts/clean_orders.py - Clean orders
sql/DDL/04_load_clean_quarantine_orders.sql - Quarantine orders
sql/DDL/04_load_clean_quarantine_orders.sql
Batch operations
- Month arguments
scripts/args_parse.py - Batch audit
sql/DDL/05_create_etl_batch_runs.sql
Other components
- Batch operator
- PostgreSQL
Connections 17
- Orders CSV → Monthly uploader: reads
scripts/ingest_orders.py - Monthly uploader → S3 raw objects: uploads partitions
scripts/ingest_orders.py - Batch operator → Staging ingestion: starts batch
README.md - Batch operator → Clean processing: starts batch
README.md - Staging ingestion → Month arguments: parses month
scripts/ingest_to_staging.py - Clean processing → Month arguments: parses month
scripts/clean_orders.py - Staging ingestion → S3 raw objects: downloads partition
scripts/ingest_to_staging.py - Staging ingestion → Staging orders: loads batch
scripts/ingest_to_staging.py - Staging ingestion → PostgreSQL: connects
scripts/ingest_to_staging.py - Staging orders → Clean processing: provides rows
README.md - Clean processing → Timestamp parser: parses timestamps
scripts/clean_orders.py - Clean processing → Quality classification: classifies rows
scripts/clean_orders.py - Clean processing → Clean orders: inserts valid rows
scripts/clean_orders.py - Clean processing → Quarantine orders: inserts rejected rows
scripts/clean_orders.py - Clean processing → PostgreSQL: runs transaction
scripts/clean_orders.py - Clean processing → Batch audit: records outcome
README.md - Staging ingestion → Batch audit: records outcome
README.md