How faizns/final-project-fraud-transaction-pipeline works
This repository implements batch and streaming fraud-transaction pipelines, with BigQuery warehouse models and a documented Looker dashboard. The batch DAG invokes download, Spark transformation, GCS upload, external-table creation, and dbt runs; the streaming producer publishes Avro records that the consumer stores and checks for fraud. The graph preserves the documented warehouse, provisioning, notification, and dashboard capabilities. Edges reflect the DAG excerpt or explicit README statements; dbt model internals and Terraform configuration were not sampled, so their internal links are omitted.
Main entry points: batch_dag.py Batch Orchestrator · consumer.py Fraud Consumer · producer.py Avro Producer · main.tf Cloud Provisioning
Components 18
Batch Pipeline
- Batch Orchestrator
dags/batch_dag.py - Dataset Download
dags/download.sh - Batch Transform
spark/spark_transform.py
Streaming Pipeline
- Avro Producer
kafka/producer.py - Kafka Topic
- Schema Registry
- Fraud Consumer
kafka/consumer.py - Email Service
Warehouse Analytics
- External Table
- Staging Model
dbt/models/staging - Core Star Schema
dbt/models/core - Analytic Marts
dbt/models/mart - Looker Dashboard
Cloud Platform
- Cloud Storage
- BigQuery
- Cloud Provisioning
terraform/main.tf
Other components
- Pipeline Operator
- Transaction Dataset
Connections 18
- Pipeline Operator → Batch Orchestrator: runs batch
readme.md - Transaction Dataset → Dataset Download: provides CSV
readme.md - Batch Orchestrator → Dataset Download: invokes
dags/batch_dag.py - Batch Orchestrator → Batch Transform: runs transform
dags/batch_dag.py - Batch Orchestrator → Cloud Storage: uploads output
dags/batch_dag.py - Batch Orchestrator → External Table: creates table
dags/batch_dag.py - Batch Orchestrator → Staging Model: runs staging
dags/batch_dag.py - Batch Orchestrator → Core Star Schema: runs transforms
dags/batch_dag.py - Avro Producer → Kafka Topic: publishes records
kafka/producer.py - Avro Producer → Schema Registry: uses schemas
kafka/producer.py - Fraud Consumer → Kafka Topic: consumes records
kafka/consumer.py - Fraud Consumer → Schema Registry: uses schemas
kafka/consumer.py - Fraud Consumer → BigQuery: writes payments
kafka/consumer.py - Fraud Consumer → Email Service: sends fraud alert
kafka/consumer.py - Cloud Provisioning → Cloud Storage: provisions
readme.md - Cloud Provisioning → BigQuery: provisions
readme.md - Core Star Schema → Analytic Marts
- Analytic Marts → Looker Dashboard: supports reporting
readme.md