This project demonstrates end-to-end data pipeline using the ELT model (extract - load - transform), that downloads climatology data from AWS S3 Bucket, uploads it to MinIo and transforms it with modern tech stacks like Dbt, Duckdb, Pyspark in order to be visualized with Apache Superset.
The datasets are ingested from NOAA’s Global Historical Climatology Network of which mainly CSV format is used in this project. It contains daily observations over global land areas. Each file corresponds to a year from 1763 to present and is named as such & is updated daily.
Here we used:
ghcnd-countries- metadata about countries name & codeghcnd-stations- metadata of stationsyear- daily records of weather parameters
- Python – for scripting and Airflow custom operators
- Airflow – DAGs orchestration
- Minio - s3-compatible object storage as data lake
- Spark - data tranformation parallely with repartition
- DBT – data transformation & modeling
- dbt test - validation & data quality
- DuckDB - lightweight query engine with DBT
- PostgreSQL – final data warehouse for transformed data
- Superset – dashboard & visualization
- Docker - airflow,minio,spark,dbt,superset infrastructure
├── airflow
│ ├── config # Airflow configs
│ ├── dags # Airflow DAGs
│ │ ├── current_year_ingest.py
│ │ ├── dbt_duckdb.py
│ │ |── last_five_years_ingest.py
| | |__station_countries_ingest.py
| | |___transformation.py
| |__jobs
| | |___spark-eda.ipynb # Spark transform scripts
│ ├── docker-compose.yaml # Service orchestration
│ ├── Dockerfile # Custom airflow image
│ ├── requirements.txt
│ └── .env # Environment variables
├── dbt_noaa_climatology # DBT transformation project
│ ├── dbt_project.yml
│ ├── macros
│ ├── models # Dbt transformations
│ │ ├── final
│ │ ├── schema.yml
│ │ └── staging
│ ├── profiles.yml
│ └── tests
├── dashboards # Pipeline architecture, dashboards
├── superset
│ ├── dockerfile # Custom superset image- We use
dockerto containerize the application andairflowto orchestrate dags. NOAA_GHCNdata of.csvformat is ingested fromS3-bucket, & load it into the datalake -MinIO.- After obtaining the data, we perform EDA first in
.jupyterthen prepare to save dataframes. - From MinIO, load data into spark for transformations & write into data warehouse -
PostgreSQL. - Transform as needed using
dbt-duckdbthroughduckdbas query-engine betweendbt&MinIO.staging: Raw & dataschema formatted tablesfinal: Ready-to-query analytical tables
- Visualize the silver & gold data using
superset
git clone https://github.com/yourusername/climatology.git
cd climatologyGet airflow docker compose with:
curl -LfO 'https://airflow.apache.org/docs/apache-airflow/3.0.3/docker-compose.yaml'Initialize folders & environment:
mkdir -p ./dags ./logs ./plugins ./config
echo -e "AIRFLOW_UID=$(id -u)" > .envEnsure .env file has all credentials if needed.
Ensure your DBT project is placed at:
/opt/dbt_climatologyEdit profiles.yml accordingly to connect to your external DuckDB instance.
To build image & run:
docker compose up build --no-cache
docker compose upTo shut down & clean up:
docker compose down --volumes --remove-orphans- Airflow init apiserver, scheduler, dag-processor, trigger, CLI
- Minio server & client
- Jupyter Notebook Integrated with Spark
- Spark Master & workers
- Superset UI
Example .env file:
# .env
AIRFLOW_UID=1000
POSTGRES_HOST = localhost
POSTGRES_PORT = 5432
POSTGRES_DB = db
POSTGRES_USER = postgres
POSTGRES_PASSWORD = postgres
AIRFLOW_CONN_POSTGRES_DEFAULT=postgresql://postgres:postgres@host:port/db
JDBC_URL=jdbc:postgresql://host:port/db
SUPERSET_SECRET_KEY='your-secret-key'
SUPERSET_DATABASE_URI=postgresql+psycopg2://{POSTGRES_USER}:{POSTGRES_PASSWORD}@{POSTGRES_HOST}:{POSTGRES_PORT}/{POSTGRES_DB?options=-csearch_path%3d{SCHEMA_NAME}
MINIO_ENDPOINT=9000
MINIO_ACCESS_KEY=admin
MINIO_SECRET_KEY=admin
MINIO_BUCKET=dbYou can replace all above info like host,user,password with your own.
- http://localhost:8080 - Airflow
- http://localhost:9090 - Spark master (Submit your job scripts in spark/)
- http://localhost:8888 - Jupyter Notebook
- http://localhost:9001 - MinIO
- http://localhost:8088 - Superset
- Deploy using one of cloud services like AWS, Azure, Google Cloud.
- Testing environment & data quality with Great Expectations

