我是第一次创建到Oracle的jdbc接收器连接器(合流)。下面是连接器配置。它不是在创建和加载表,而是根据日志增加偏移量,并且日志中不会引发任何错误。请提出可能是什么问题。
通过Java生产5条示例记录。我试图用curl检查状态,它正在运行。
{
"name": "ora_sink_task",
"config": {
"connector.class": "io.confluent.connect.jdbc.JdbcSinkConnector",
"connection.url": "jdbc:oracle:thin:@host:port/servicename",
"connection.user": "user",
"connection.password": "password",
"topics": "connecttest",
"tasks.max": "1",
"table.name.format": "member_cbdt_sink1",
"value.converter":"io.confluent.connect.avro.AvroConverter",
"value.converter.schema.registry.url":"http://localhost:8081",
"auto.create": "true"
}
}
连接器日志:
[2019-09-09 00:34:23,832]信息检查Oracle方言是否存在 表“ member_cbdt_sink1” (io.confluent.connect.jdbc.dialect.OracleDatabaseDialect:492) [2019-09-09 00:34:23,834]信息使用Oracle方言表 缺少“ member_cbdt_sink1” (io.confluent.connect.jdbc.dialect.OracleDatabaseDialect:500) [2019-09-09 00:34:23,846]信息正在检查Oracle方言的存在 表“ member_cbdt_sink1” (io.confluent.connect.jdbc.dialect.OracleDatabaseDialect:492) [2019-09-09 00:34:23,849] INFO使用Oracle方言表 存在“ member_cbdt_sink1” (io.confluent.connect.jdbc.dialect.OracleDatabaseDialect:500) [2019-09-09 00:34:24,037]信息设置表的元数据 “ member_cbdt_sink1”到表{name ='“ member_cbdt_sink1”', column = [Column {'first_name',isPrimaryKey = false,allowNull = false, sqlType = CLOB},Column {'height',isPrimaryKey = false,allowsNull = false, sqlType = BINARY_FLOAT},列{'last_name',isPrimaryKey = false, allowNull = false,sqlType = CLOB},Column {'age',isPrimaryKey = false, allowNull = false,sqlType = NUMBER},列{'automated_email', isPrimaryKey = false,allowsNull = true,sqlType = NUMBER},列{'weight', isPrimaryKey = false,allowsNull = false,sqlType = BINARY_FLOAT}]} (io.confluent.connect.jdbc.util.TableDefinitions:65)[2019-09-09 00:35:13,775] INFO WorkerSinkTask {id = ora_sink_task-0}提交 使用序列号1异步偏移: {connecttest-0 = OffsetAndMetadata {offset = 55,元数据=''}} (org.apache.kafka.connect.runtime.WorkerSinkTask:345)[2019-09-09 01:03:13,775] INFO WorkerSinkTask {id = ora_sink_task-0}提交 使用序列号29异步偏移: {connecttest-0 = OffsetAndMetadata {offset = 60,元数据=''}} (org.apache.kafka.connect.runtime.WorkerSinkTask:345)
答案 0 :(得分:0)
当Oracle查找大写字母时,它通过将table.name.format的值从小写更改为大写来工作。