How edilsonathayde/covid19-data-engineering works
Project Type and Purpose
• This is a data engineering project implementing an ETL pipeline in Python + Spark, deployed on Databricks.
• Purpose: extract public COVID-19 data, process it through Medallion layers (RAW → Bronze → Silver → Gold), and make it available for analysis/visualization.
High-Level Components
a. Data Sources
• COVID-19 Open Data CSV (external URL)
b. Compute & Orchestration
• Databricks Workspace & Spark Cluster
• Python modules + Notebooks (src/utils/functions.py, src/etl/extract.py, notebooks/*.ipynb)
c. Storage Layers (Delta Lake on DBFS or Cloud Storage)
• RAW (original CSV)
• Bronze (Delta format, minimal structuring)
• Silver (cleansed & normalized)
• Gold (aggregated metrics)
d. Configuration & Environment
• config/configs.py (paths, environment variables)
• config/spark_session.py (Spark session builder)
e. Consumers & Visualization
• Notebook analyses (EDA graphs in images/)
• Downstream dashboards or BI tools (implicit)
Relationships & Data Flow
1. External CSV URL → Extraction function (download_file_from_url)
2. Extraction → RAW storage
3. RAW → Transformation step (Bronze conversion)
4. Bronze → Transformation step (Silver cleaning)
5. Silver → Transformation step (Gold aggregation)
6. Gold → Notebook analyses & dashboards
• Configuration injecting into extraction/transformation modules (config blocks feeding paths and Spark settings).
Architectural Patterns & Design Principles
• Medallion Architecture: clearly separate layers and annotate each with its purpose (backup, structuring, cleaning, aggregation).
• Modular code: src/utils/functions.py holds generic file & transform helpers, src/etl/extract.py holds extraction logic.
• Infrastructure as code: configs separate from business logic; Spark session builder decouples environment setup.
Technologies, Frameworks & Libraries
• Python 3.x
• Apache Spark on Databricks
• Delta Lake format for ACID transactions
• PyPI libraries from requirements.txt (e.g., pandas, requests)
• Databricks File System (DBFS) or cloud storage under the hood