> For the complete documentation index, see [llms.txt](https://docs.streambased.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.streambased.io/get-started/view-kafka-and-iceberg-together.md).

# View Kafka & Iceberg together

In order to follow this page, it's advised that you [run the demo](/get-started/run-the-demo.md) first.

Streambased surfaces your Iceberg and Kafka data together. Let's see this in action by first finding our Kafka and Iceberg data within their respective systems.&#x20;

### The Kafka data

You can see your available Kafka data within [AKHQ](http://localhost:9090/ui/docker-kafka-server/topic) ([a dashboard for Kafka](https://akhq.io)).

Your topics are being populated in real time by [Shadowtraffic](https://shadowtraffic.io), and when your 'customers' and 'transactions' topics reach predetermined limits (1,000,000, and 500,000 respectively) they are moved from Kafka to Iceberg.&#x20;

<figure><img src="https://3473204423-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC7OgUqUHqZgOXvYL5kPN%2Fuploads%2FsELCO6O0MYlHxGSMJ1YE%2FScreenshot%202025-11-28%20130824.png?alt=media&amp;token=b9402ec7-ecb8-466d-b0f6-c5cfd8d7dd6d" alt=""><figcaption></figcaption></figure>

Once your dashboard looks like this ⬇️&#x20;

<figure><img src="https://3473204423-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC7OgUqUHqZgOXvYL5kPN%2Fuploads%2FRaixFOQVg09d1DaqEKYX%2FScreenshot%202025-11-28%20131252.png?alt=media&amp;token=cea76a3a-ac4d-402f-bf26-521d9cbddec6" alt=""><figcaption></figcaption></figure>

* 1,000,000 'customers' messages now live in Iceberg.
* 10,000 'accounts' messages live in Kafka exclusively (no more data inbound).
* Messages within 'transactions' are being updated in real time (you'll see this if you refresh the page).

### The Iceberg data

Our Iceberg data lives within MinIO (at [http://localhost:9001/browser/warehouse/](http://35.212.149.246:9001/browser/warehouse/coldset%2F); **username**: admin; **password**: password)

<figure><img src="https://3473204423-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC7OgUqUHqZgOXvYL5kPN%2Fuploads%2FbqimcdHFiohEhiGZSbBC%2FScreenshot%202025-11-28%20134258.png?alt=media&amp;token=681868bb-510b-4508-9479-ab507c476b40" alt=""><figcaption></figcaption></figure>

The structure of our Iceberg data is such that:

* The `transactions` folder maps onto the Kafka topic of the same name, and it contains historic Kafka data migrated to Iceberg by [I.S.K.](/deploy-and-operate/streambased-platform/iceberg-service-for-kafka-i.s.k..md).
* So too, `customers` maps onto the Kafka topic of the same name, but its data lives exclusively in Iceberg.
* `Branches` does not map onto any Kafka topic; it is exclusively an Iceberg table.

### View the data together

Now let's head to a Jupyter notebook at [this address](http://localhost:8888/notebooks/notebooks/demo_script.ipynb) and see both sets.

Before getting started, make sure to run cells 1–6 below. After running those cells, you should see similar outputs to these for cells 2 and 6:

<figure><img src="https://3473204423-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC7OgUqUHqZgOXvYL5kPN%2Fuploads%2FZLUhMEeRwGW6fTAjFapK%2Fimage.png?alt=media&amp;token=ec480845-92a2-4a22-a8db-e66f9d99fefc" alt=""><figcaption></figcaption></figure>

After this, run the following SQL query:

```python
spark.sql("SHOW DATABASES").show()
```

At which point you will see these namespaces:

```
+---------+
|namespace|
+---------+
|   hotset|
|  coldset|
|   merged|
+---------+
```

A namespace in Iceberg can be understood as a database, and a database in Streambased is a **logical view** of the data. The database is not a copy of your data  —  the Kafka data and the Iceberg data stay where they are. The `hotset` is the view of the data as found in Kafka, the `coldset` is the view of the data as found in Iceberg, and `merged` is the view of all the data from both Kafka and Iceberg (including their exclusive topics).

{% hint style="info" %}
"Hotset" and "coldset" are key terminology in Streambased's products. You can expect to regularly see both terms.
{% endhint %}

As you can see, Kafka data, Iceberg data, and Kafka & Iceberg data all exist as databases to be queried. Next, let's query each of those databases in turn using PySpark.
