I need to configure a JDBC Sink Connector to read data from topic and write into SQL DB, i have set auto.create = false as i have table already defined in SQL
Connector:
{
"name": "test-sink",
"connector.class": "io.confluent.connect.jdbc.JdbcSinkConnector",
"tasks.max": "1",
"topics": "orders",
"connection.user": "myusername",
"connection.password": "mypwd",
auto.create=false",
insert.mode="insert"
}
I need to understand how would i pass the insert query in this? As how Connector would push the data in columns of SQL table, i have JSON data in my topicJSON of topic looks like:
{
"OrderId": "1",
"OrderNo": "ef209",
OrderDetails: {
"OrderQuantity":"2",
"OrderRecipient":"test",
"OrderDelDate":"22-10-2019"
}
}
Please can you suggest as how would i i pass something like Insert into mytable Select OrderId as ordered, OrderNo as orderno, OrderDetails.OrderQuantity as orderquantity, OrderDetails.OrderRecipient as orderrecipient from orders;