docs / setup
Setup Guide
How to clone the repository, configure the environment, and run the full pipeline from scratch.
prerequisites
Python 3.11+
Core language for all ETL scripts
PostgreSQL 15+
Silver and Gold layer storage
Node.js 18+
Website (this site) — optional
python dependencies
.env configuration
variable
example
description
DB_URL
postgresql://domotic:pass@localhost:5432/domotic_dev
App user connection string
DB_ADMIN_URL
postgresql://postgres:adminpass@localhost:5432/postgres
Admin connection for DB creation
MYSQL_URL
mysql+pymysql://student:pass@10.130.25.152:3306/pidb
MySQL source (school network)
SMB_PATH
Z:\
Mounted SMB share with sensor JSON files
BRONZE_ROOT
storage\bronze
Local Bronze storage folder
SFTP_HOST
(hostname)
sFTP server for weather data
SFTP_PORT
22
sFTP port
SFTP_USER
(username)
sFTP credentials
SFTP_PASSWORD
(password)
sFTP credentials
SFTP_PATH
/Meteo2
Remote directory for weather CSVs
WEATHER_MIN_YEAR
2023
Ignore weather data before this year
LOG_DIR
logs
Directory for ETL log files
step-by-step setup
git clone https://github.com/dehlya/data-cycle-domotic.git && cd data-cycle-domotic
pip install -r requirements.txt
cp .env.example .env # then fill in your values
python etl/bronze_to_silver/create_silver.py
python etl/bronze_to_silver/import_mysql_to_silver.py
python ingestion/fast_flow/bulk_to_bronze.py --full
python etl/bronze_to_silver/flatten_sensors.py
python etl/silver_to_gold/create_gold.py
python etl/silver_to_gold/populate_gold.py
python ingestion/fast_flow/watcher.py