Click to copy

• Reviewed for ksqlDB 0.29

How to Create a Source Connector in ksqlDB

Here is an example of creating a Kafka connector within ksqlDB:

CREATE SOURCE CONNECTOR `flights-tables` WITH (
  "connector.class" = 'io.confluent.connect.jdbc.JdbcSourceConnector',
  "connection.url" = 'jdbc:postgresql://localhost:5432/database',
  "mode" = 'bulk',
  "topic.prefix" = 'flights-',
  "table.whitelist" = 'flight,passenger',
  "key" = 'id'
);

For this to work, make sure you have set up your ksqlDB to use an Apache Kafka Connect cluster.

Discover what readers are saying
topictale
Get easy to digest how-tos on ksqlDB
Sign up
Please read our Privacy Policy to understand how we protect and manage your data.
You may also like