# 3. Kafka Connect with ksqlDB

![](/files/-MDZOpH7Ve5H9gyC8GmV)

![](/files/-MDZP4e7JaMRRQDwKb4u)

Use docker compose-up to setup postgre database first .

![](/files/-MDZPEd0JBoLPjbx4QSE)

![](/files/-MDZPV4B6epGqD4jdIYu)

![](/files/-MDZPc7ENVYNDUuThJ_9)

\>>Now create table insed postgre & insert some data :

![](/files/-MDZPqPQRT_s4vOJX2co)

![](/files/-MDZPwJsjXdTST6teTMo)

![](/files/-MDZQ0oyZVvFmH2zEGiF)

\>>>Now inside KSQL create source connector&#x20;

while creating table use "topic-prefix"  'db-" . So that it can automatically create topic.

![](/files/-MDZQKFtQD_ZybRKEB4n)

![](/files/-MDZR1V7wY4Zau14jzXj)

Check the data :

![](/files/-MDZR6ZKt8IOktO9brIb)

Now check the real-time scenario. Go back & add some data in source database (postgre) & check whether KSQL constantanly showing up the data.

Derek is the new record.

![](/files/-MDZRWq238BwSU9Kf9QD)

Add one more record ::Emma

![](/files/-MDZRhsfuBUWkjQ9pk_t)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://architectures.gitbook.io/project/apahce-kafka/ksql-on-ksqldb-for-stream-processing/ksql-intermediate/3.-kafka-connect-with-ksqldb.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
