Skip to content

Commit a11eec3

Browse files
authored
Update README.md
1 parent 0f6203d commit a11eec3

File tree

1 file changed

+33
-35
lines changed

1 file changed

+33
-35
lines changed

README.md

Lines changed: 33 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,36 @@
1-
# kafkaConnect-jdbc-connector-sql
2-
Connect SQL server using JDBC connector
3-
4-
#Connect Sql Server using kafka connect and jdbc connector
5-
6-
to run this example you need to have SQL server installed.
7-
8-
9-
and then follow the steps to start
10-
11-
1. start zookeeper server
12-
13-
kafka_2.12-2.2.1/bin/zookeeper-server-start.sh zookeeper.properties
14-
15-
2. then start kafka server
16-
17-
kafka_2.12-2.2.1/bin/kafka-server-start.sh server.properties
18-
19-
3. register the connector
20-
21-
kafka_2.12-2.2.1/bin/connect-standalone.sh connect-standalone.properties sql-server-jdbc-connector.properties
22-
23-
table.whitelist - specify tables you want to monitor
24-
mode - specifiy the mode incrementing, timestamp, both
25-
for more - https://docs.confluent.io/current/connect/kafka-connect-jdbc/source-connector/source_config_options.html#mode
26-
27-
4. check topic list
28-
29-
kafka_2.12-2.2.1/bin/kafka-topics.sh --bootstrap-server localhost:9092 --list
30-
31-
and check wheather there are any topics starting from "incrementing-"
1+
# Connect SQL server using JDBC, Debezium connectors
2+
3+
##### to connect using debezium connetor
4+
- need to enable CDC of sql server and for the tables you wish to track
5+
6+
to run this example you need to have SQL server installed.
7+
8+
#### 1. start zookeeper server.
9+
```sh
10+
$ kafka_2.12-2.2.1/bin/zookeeper-server-start.sh zookeeper.properties
11+
```
12+
#### 2. then start kafka server
13+
```sh
14+
$ kafka_2.12-2.2.1/bin/kafka-server-start.sh server.properties
15+
```
16+
#### 3. register the connector
17+
```sh
18+
$ kafka_2.12-2.2.1/bin/connect-standalone.sh connect-standalone.properties sql-server-jdbc-connector.properties
19+
```
20+
- table.whitelist - specify tables you want to monitor
21+
- mode - specifiy the mode incrementing, timestamp, both
22+
- for more [Source Config](http://www.google.com)
23+
24+
#### 4. check topic list
25+
```sh
26+
$ kafka_2.12-2.2.1/bin/kafka-topics.sh --bootstrap-server localhost:9092 --list
27+
```
28+
- and check wheather there are any topics starting from "incrementing-"
3229
* you can change the prefix by changing topic.prefix in connector properties
3330

34-
5. start console consumer and subscribe to a topic
35-
36-
kafka_2.12-2.2.1/bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --from-beginning --topic incrementing-students
31+
#### 5. start console consumer and subscribe to a topic
32+
```sh
33+
$ kafka_2.12-2.2.1/bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --from-beginning --topic incrementing-students
34+
```
35+
#### 6. make changes (insert, update) and see those are reflected on consumer.
3736

38-
6. make changes (insert, update) and see those are reflected on consumer.

0 commit comments

Comments
 (0)