简体   繁体   English

我正在尝试使用 kafka connect 将我的本地服务器数据库(Mssql 数据库)连接到不同的数据库(Mssql 但不同的表)?

[英]I am trying to connect my local server database(Mssql Database) to different database (Mssql but different table) using kafka connect?

Creating the source-connection.创建源连接。

curl -X POST http://localhost:8083/connectors -H "Content-Type: application/json" -d '{    
    "name": "jdbc_source_mysql_01",     
    "config": {       
        "connector.class": "io.confluent.connect.jdbc.JdbcSourceConnector",       
        "connection.url": "jdbc:mysql://fulfillmentdbhost:3306/fulfillmentdb",       
        "connection.user": "fullfilment_user",       
        "connection.password": "<password>",       
        "topic.prefix": "order-status-update-",       
        "mode":"timestamp",       
        "table.whitelist" : "fulfullmentdb.status",       
        "timestamp.column.name": "LAST_UPDATED",       
        "validate.non.null": false     
    }   
}'

Creating the sink-connection.创建接收器连接。

curl -X POST http://localhost:8083/connectors -H "Content-Type: application/json" -d '{    
    "name": "jdbc_sink_mysql_01",     
    "config": {       
        "connector.class": "io.confluent.connect.jdbc.JdbcSinkConnector",       
        "connection.url": "jdbc:mysql://crmdbhost:3306/crmdb",       
        "connection.user": "crm_user",       
        "connection.password": "<password>",       
        "topics": "order-status-update-status",       
        "table.name.format" : "crmdb.order_status"    
    }   
}'

the connector.class is given from confluent community. connector.class来自融合社区。 But I want it from Apache Kafka Which is open source但我想要它来自 Apache Kafka 这是开源的

we were searching how we can replace that line with apache kafka one.我们正在搜索如何用 apache kafka one 替换该行。

There is no JDBC Connector provided by Apache Kafka . Apache Kafka 没有提供JDBC 连接器。

The Confluent one is open source . Confluent是开源的。

There is also one from IBM and Aiven还有一个来自 IBMAiven

Confluent (among other companies, as shown) simply write plugins for Kafka Connect, which you need to download/upgrade/install on your own Apache Kafka Connect servers. Confluent(在其他公司中,如图所示)只需为 Kafka Connect 编写插件,您需要在自己的 Apache Kafka Connect 服务器上下载/升级/安装这些插件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM