【发布时间】:2019-04-18 10:18:09
【问题描述】:
我正在使用属性/json 文件配置我的连接器,当它从源连接器读取消息但没有成功时,我试图添加一个包含 kafka 时间戳的时间戳列。
我尝试添加transforms,但它始终为空,并且我的接收器连接器“大查询”返回错误
更新表架构失败
我确实将这些配置放在 bigquery 连接器属性中
transforms=InsertField
transforms.InsertField.timestamp.field=fieldtime
transforms.InsertField.type=org.apache.kafka.connect.transforms.InsertField$Value
我的源 Config Sap 连接器
{
"name": "sap",
"config": {
"connector.class": "com.sap.kafka.connect.source.hana.HANASourceConnector",
"tasks.max": "10",
"topics": "mytopic",
"connection.url": "jdbc:sap://IP:30015/",
"connection.user": "user",
"connection.password": "pass",
"group.id":"589f5ff5-1c43-46f4-bdd3-66884d61m185",
"mytopic.table.name": "\"schema\".\"mytable\""
}
}
我的接收器连接器 BigQuery
name=bigconnect
connector.class=com.wepay.kafka.connect.bigquery.BigQuerySinkConnector
tasks.max=1
sanitizeTopics=true
autoCreateTables=true
autoUpdateSchemas=true
schemaRetriever=com.wepay.kafka.connect.bigquery.schemaregistry.schemaretriever.SchemaRegistrySchemaRetriever
schemaRegistryLocation=http://localhost:8081
bufferSize=100000
maxWriteSize=10000
tableWriteWait=1000
project=kafka-test-217517
topics=mytopic
datasets=.*=sap_dataset
keyfile=/opt/bgaccess.json
transforms=InsertField
transforms.InsertField.timestamp.field=fieldtime
transforms.InsertField.type=org.apache.kafka.connect.transforms.InsertField$Value
【问题讨论】:
-
您使用的是哪个接收器连接器?
-
bigquery 我已尝试使用 transforms.InsertSource.timestamp.field 但它给出了一个错误,即无法修改架构
-
您能否分享您的完整 Kafka Connect 配置(工作程序和连接器)以及来自 Kafka Connect 工作程序的日志?
-
@RobinMoffatt 源是不同的多个数据库,目标连接器是 Bigquery 我用我的配置更新了我的答案
-
这不是我问的:)你能分享你的 Kafka Connect 配置文件(worker 和 connector)的全部内容,以及来自 Kafka Connect worker 的日志吗?
标签: apache-kafka google-bigquery apache-kafka-connect