Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Real-time Aggregation

Aggregation
1. Sum of rewards by the customer
2. Average salary by the department
Real-time Aggregation

1. Sum of rewards by the customer

Purchase
Add Rewards

Redeem
Reduce Rewards
Real-time Aggregation

1. Sum of rewards by the customer

Total Sale: XX
Redeemed Points: YY
Adjust
Rewards
Real-time Aggregation
2. Average salary by the department
KTable - Update Stream
id name department salary id name department salary
101 Prashant engineering 5000 department Avg. Salary
101 Prashant enginnering support 5000
102 John accounts 8000
102 John accounts 8000 enginnering 5000
103 Abdul engineering 3000
103 Abdul enginnering 3000 accounts 8000
104 Melinda support 7000
104 Melinda support enginnering 7000 support 5500
105 Jimmy support 6000
105 Jimmy support 6000

KStream - Append Stream


id name department salary
id name department salary 101 Prashant enginnering 5000
102 John accounts 8000
department Avg. Salary
101 Prashant support 5000
104 Melinda enginnering 7000 103 Abdul enginnering 3000 enginnering 5000
104 Melinda support 7000 accounts 8000
105 Jimmy support 6000 support 6000
101 Prashant support 5000
104 Melinda enginnering 7000

You might also like