Click to copy
Connectors • 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.
Was this article helpful?