This project implements real-time fraud detection using:
- Kafka (Streaming transaction events)
- Snowflake (Data warehouse for storing transactions)
- dbt (Data transformations, anomaly detection, and aggregations)
- Jupyter Notebook (For querying and analyzing results)
Read the Full Article on Medium: Link to Medium
git clone https://github.com/usefusefi/dbt-fraud-detection.git
cd dbt-fraud-detectionpip install dbt-core dbt-snowflake kafka-python pandasdefault:
outputs:
dev:
type: snowflake
account: your_snowflake_account
user: your_user
password: your_password
role: your_role
warehouse: your_warehouse
schema: fraud_detection
threads: 4
target: devdbt runpython scripts/kafka_fraud_producer.pyRun this SQL in Snowflake:
SELECT * FROM fact_fraud_detection ORDER BY fraud_transactions DESC;