Created
November 16, 2018 15:50
-
-
Save hpgrahsl/8a1326e2b2b38d7dd436d4e399361bc2 to your computer and use it in GitHub Desktop.
MongoDB Sink Connector
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -X POST \ | |
http://localhost:8083/connectors \ | |
-H 'Content-Type: application/json' \ | |
-d '{ "name": "cosmosdb-sink", | |
"config": | |
{ | |
"topics":"dbserver1.inventory.products,dbserver1.inventory.products_on_hand,dbserver1.inventory.customers,dbserver1.inventory.addresses,dbserver1.inventory.orders", | |
"connector.class":"at.grahsl.kafka.connect.mongodb.MongoDbSinkConnector", | |
"key.converter":"org.apache.kafka.connect.json.JsonConverter", | |
"key.converter.schemas.enable":true, | |
"value.converter":"org.apache.kafka.connect.json.JsonConverter", | |
"value.converter.schemas.enable":true, | |
"mongodb.connection.uri": "<PUT_YOUR_CONNECTION_STRING_HERE_AND_ADD_DATABASE_NAME>", | |
"mongodb.collections": "products,productsonhand,customers,addresses,orders", | |
"mongodb.collection.dbserver1.inventory.products": "products", | |
"mongodb.collection.dbserver1.inventory.products_on_hand": "productsonhand", | |
"mongodb.collection.dbserver1.inventory.customers": "customers", | |
"mongodb.collection.dbserver1.inventory.addresses": "addresses", | |
"mongodb.collection.dbserver1.inventory.orders": "orders", | |
"mongodb.change.data.capture.handler": "at.grahsl.kafka.connect.mongodb.cdc.debezium.rdbms.mysql.MysqlHandler" | |
} | |
}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment