How dain55788/end-to-end-streaming-big-data works
Project Type and Purpose
• This is a full-stack big data processing project focused on end-to-end pipelines—ingesting, processing, transforming, and serving big data.
• It integrates streaming (Kafka, Spark Streaming), batch processing (Python scripts), orchestration (Airflow), data transformation & modeling (dbt), change data capture (Debezium), data storage (MinIO/DeltaLake), and interactive querying (Trino with DBeaver).
• The project also embeds a medallion (ELT) pipeline and supports a star schema model for its data warehouse.
Main Components
a. Data Ingestion & Streaming:
• Apache Kafka: Represented as the central event streaming system. Note that Kafka components (like Confluent Control Center, Zookeeper, and Schema Registry) are used for managing streams.
• Spark Streaming: Shown as processing streaming sales events. It reads events from Kafka, applies transformations (e.g., converting streamed data to Delta format), and writes to the storage layer.
• Debezium: Capture CDC data (configured via JSON in debezium/configs) and stream it into Kafka.
b. Batch Processing:
• Batch Processing Scripts: A separate component that includes Python scripts (e.g., datalake_to_dwh.py) which handle batch operations and data loading.
c. Data Orchestration:
• Apache Airflow: Display the scheduler/orchestrator that triggers DAGs (e.g., elt_data_pipeline.py) to manage various ETL/ELT jobs.
d. Data Storage & Lakehouse:
e. Data Transformation & Modeling:
• dbt Project: Show the dbt component with its models (dimensional and fact tables), seeds, and tests. This module transforms raw data into dimensional models and integrates with PostgreSQL for the data warehouse.
f. Query Engine:
g. Supporting Components:
• Data Visualization and Monitoring Interfaces: Optionally show external interfaces such as Superset for visualization, Confluent Control Center for Kafka management, and the Trino UI.
• Docker & Containerization: Include Docker Compose as an orchestration layer to manage and deploy these services as containers.
• Utility & Script Modules: Represent utility scripts (e.g., in the scripts and utils directories) that support storage operations (bucket creation, data conversion) and facilitate data flow.
Representing Relationships and Data Flow
• Raw data (Amazon Sales CSV in the data folder) enters through ingestion pipelines.
• Debezium captures CDC data and feeds it into Kafka.
• Kafka feeds events to Spark Streaming, which processes and writes data to MinIO/DeltaLake.
• Airflow orchestrates both batch processing (via Python scripts) and streaming jobs.
• Processed data is then modeled by dbt, resulting in data warehouses accessible by Trino.
• External tools (Confluent Control Center, Superset) interface with Kafka and Trino respectively.
• If data flows are bidirectional or require acknowledgments (e.g., from Airflow back to logging or monitoring services).
Architectural Patterns / Design Principles
• Separation of concerns: streaming vs. batch processing, orchestration vs. transformation, and storage vs. querying.
• Modularity: Each component (Airflow, Kafka, Spark, dbt, etc.) is encapsulated but interoperates via clearly defined interfaces (APIs, message queues, file I/O).
• If applicable, note how containerization (via Docker Compose) abstracts infrastructure for these components.
• For this full-stack big data project, pay close attention to the distinct separation between the ingestion/streaming components and the data transformation/querying side.
• Components logically:
• Data Ingestion & Processing Layer: Debezium, Kafka, Spark Streaming, and Batch Scripts.
• Orchestration Layer: Apache Airflow managing the pipelines.
• Data Storage & Modeling Layer: MinIO/DeltaLake and dbt (with PostgreSQL as the backend if needed).
• Data Access/Visualization Layer: Trino (with DBeaver or Superset as external visualization tools).
Final Touches
• Double-check that every directory and script that impacts data flow or transformation is represented where relevant.