This project sets up an end-to-end analytics pipeline that loads data from Supabase into Snowflake, transforms it with dbt, and visualizes it in Apache Superset.
- Python 3.8+
- PostgreSQL
- Supabase account and credentials
- Snowflake account and credentials
# Create a virtual environment
python -m venv venv
# Activate the virtual environment
# On Windows:
venv\Scripts\activate
# On Unix or MacOS:
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt# Start postgres in docker
docker compose up --buildMake sure you have a secrets.toml file in the .dlt folder with the following structure:
# Start Dagster webserver
dagster devThe Dagster UI will be available at http://localhost:3000
In the Dagster UI:
- Navigate to the Assets tab
- Select all assets
- Click "Materialize Selected"
This will:
- Load data from CSV to PostgreSQL database using dlt
- Run dbt transformations on the loaded data
# Change directory to superset folder
cd superset
# Make scripts executable
chmod +x setup_db.sh run_superset.sh
# Set up the database
./setup_db.sh
# Start Superset
./run_superset.shWhen running run_superset.sh, you'll be prompted to create an admin user. Follow the prompts to set up your credentials.
Superset will be available at http://localhost:8088
- Log in to Superset using your admin credentials
- Go to Data → Databases and add your PostgreSQL connection
- Create new datasets from your analytics table
- Create charts using these datasets
- Combine charts into a dashboard
- If you encounter database connection issues, verify your credentials in
secrets.tomlandprofiles.yml - For Superset connection issues, check
superset_config.pysettings - Make sure all required ports are available and not blocked by firewall
Never commit files containing credentials (secrets.toml, profiles.yml, superset_config.py) to version control. Add them to your .gitignore file. For demonstration purpose, we have unblocked some of these files.