Fraud Detection
on credit card using Apache Kafka KSQL
:CREATE TABLE possible_fraud AS
SELECT card_number, count(*)
FROM authorization_attempts
WINDOW TUMBLING (SIZE 5 SECONDS)
GROUP BY card_number
HAVING count(*) > 3;
The above query creates a moving window in 5 seconds timeframe and check whether there are more than 3 authorization attempt on a
specific credit card, real time!
KSQL is a good fit for identifying patterns or anomalies on real-time data. By processing the stream as data arrives you can identify and properly surface out of the ordinary events with millisecond latency.
#apache #kafka #ksql #fraud_detection