The Kafka view of Iceberg & Kafka

In order to follow this page, it's advised that you run the demo first.

We've seen the Iceberg view of Kafka, and we've seen our Kafka and Iceberg data (the hotset and the coldset) within one dashboard, but what about seeing our Iceberg data within Kafka?

In other words, how do we see our data across Kafka and Iceberg as if all of that data existed in Kafka, but without the associated costs and retention considerations?

Streambased makes this possible too, with our Kafka Service for Iceberg (K.S.I.).

K.S.I. works as a combined proxy, Iceberg engine, and row processor in order to surface Iceberg data as messages within a Kafka topic, all the while preserving the Kafka offsets.

To see it running head to your terminal window and run:

docker-compose exec schema-registry kafka-avro-console-consumer --topic transactions --bootstrap-server ksi:9192 --from-beginning --property schema.registry.url=http://schema-registry:8081 --property print.offset=true --max-messages 10

You will see an output similar to this:

Offset:0        {"TransactionID":"091e7ce6-fbf0-fa13-950c-001c0a735ccd","AccountID":3339,"TransactionType":"Deposit","TransactionAmount":6194.14,"BranchID":101,"CustomerFlaggedFraud":false,"TransactionTime":1708843246000000}
Offset:1        {"TransactionID":"c6fefdcd-24b0-813a-3a8e-017f1a9aed54","AccountID":347,"TransactionType":"Withdrawal","TransactionAmount":9852.57,"BranchID":119,"CustomerFlaggedFraud":true,"TransactionTime":1708843561000000}
Offset:2        {"TransactionID":"5fb0d413-a08b-3e7f-13b7-4b75b43d5348","AccountID":9827,"TransactionType":"Withdrawal","TransactionAmount":6642.24,"BranchID":124,"CustomerFlaggedFraud":false,"TransactionTime":1708843877000000}
Offset:3        {"TransactionID":"3cc70379-f729-8620-229a-e49e7defc3b8","AccountID":2445,"TransactionType":"Withdrawal","TransactionAmount":5428.94,"BranchID":111,"CustomerFlaggedFraud":false,"TransactionTime":1708844192000000}
Offset:4        {"TransactionID":"05133492-ed6e-86e5-dd64-3a580908d2f0","AccountID":842,"TransactionType":"Withdrawal","TransactionAmount":3319.01,"BranchID":102,"CustomerFlaggedFraud":false,"TransactionTime":1708844508000000}
Offset:5        {"TransactionID":"29320372-8f39-b774-a6ab-a18140274ce6","AccountID":3691,"TransactionType":"Withdrawal","TransactionAmount":7050.36,"BranchID":100,"CustomerFlaggedFraud":false,"TransactionTime":1708844823000000}
Offset:6        {"TransactionID":"a50ec7bb-9dd1-848a-ee91-2300fe0df8aa","AccountID":6670,"TransactionType":"Deposit","TransactionAmount":924.18,"BranchID":117,"CustomerFlaggedFraud":true,"TransactionTime":1708845139000000}
Offset:7        {"TransactionID":"8c158d96-53fc-c6b9-ce52-b184461df2bd","AccountID":4762,"TransactionType":"Deposit","TransactionAmount":7988.16,"BranchID":121,"CustomerFlaggedFraud":false,"TransactionTime":1708845454000000}
Offset:8        {"TransactionID":"372e79ef-21e3-891a-6454-949596e7b393","AccountID":6386,"TransactionType":"Withdrawal","TransactionAmount":1908.83,"BranchID":107,"CustomerFlaggedFraud":false,"TransactionTime":1708845770000000}
Offset:9        {"TransactionID":"3b97212e-4d4e-6d1e-efb8-59682c5ec2f7","AccountID":4946,"TransactionType":"Deposit","TransactionAmount":445.53,"BranchID":112,"CustomerFlaggedFraud":false,"TransactionTime":1708846085000000}
Processed a total of 10 messages
circle-info

Note, as Shadowtraffic's data generator is being used here, the values in this terminal and the values in your terminal will differ, but this is expected behaviour.

Here you see the Kafka messages generated from the beginning

Last updated