我有一个包含数据的 kafka 主题,以下是我用来将数据接收到 oracle 的配置文件.
I have a kafka topic with data, following is config file I am using to sink data to oracle.
Sink.properties
Sink.properties
name=ora_sink_task
connector.class=io.confluent.connect.jdbc.JdbcSinkConnector
tasks.max=1
topics=person
connection.url=jdbc:oracle:thin:@127.0.0.1:1521/XE
connection.user=kafka
connection.password=kafka
auto.create=true
insert.mode=upsert
pk.mode=record_value
pk.fields=id
我在日志中收到以下响应.
I am getting following response in logs.
[2017-06-06 21:09:33,557] DEBUG Scavenging sessions at 1496504373557 (org.eclipse.jetty.server.session:347)
[2017-06-06 21:10:03,557] DEBUG Scavenging sessions at 1496504403557 (org.eclipse.jetty.server.session:347)
[2017-06-06 21:10:33,558] DEBUG Scavenging sessions at 1496504433558 (org.eclipse.jetty.server.session:347)
但是在oracle中没有创建表.
But no table is created in oracle.
在 Kafka 中将主题名称更改为 PERSON 并且在 Sink.properties 中将主题名称更改为 PERSON 后,它起作用了.
After changing topic name to PERSON in Kafka and topics=PERSON in Sink.properties it worked.
这篇关于如何使用kafka connect将kafka主题下沉到oracle?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!