This project uses Docker Compose to run PostgreSQL on your own computer. It is a safe way to practise a real database flow without paying for a cloud provider or exposing credentials.
sales.csv → Pandas cleaning + Pandera validation → PostgreSQL → Pandas → dashboard
From the project root:
docker compose up -d
python src/run_pipeline.py --load-postgresThe first command starts a PostgreSQL container on port 5433; the second one cleans the CSV, writes the data-quality report and replaces the three analytics tables in PostgreSQL.
DATABASE_URL="postgresql+psycopg://analytics_user:analytics_dev_password@localhost:5433/analytics" \
streamlit run dashboard/app.pyThe sidebar will show Source: PostgreSQL. Without DATABASE_URL, the app automatically reads its committed CSV fallback instead.
python src/run_pipeline.py --regenerate --load-postgresThis performs the complete local refresh in one command: regenerate source data, clean it, validate it, update reports and load PostgreSQL.
docker compose downStopping the container does not remove its stored data. To deliberately remove the local database volume as well, use docker compose down -v; this deletes only this project's local PostgreSQL data.