MongoDB sink issue

I am using MongoDB sink. Where I have sink my data to my MongoDB database. The data sink works fine. But the problem is that my upsert is not performing. It creates a new field _id and the my data is generated in the table. So could anyone suggest to me on this how to do this. Here is my configuration file.

  "name": "topic_sink",
  "config": {
    "connector.class": "com.mongodb.kafka.connect.MongoSinkConnector",
    "key.converter": "",
    "value.converter": "io.confluent.connect.avro.AvroConverter",
    "topics": "service-topic",
    "connection.uri": "mongodb://xxx:xxx@",
    "database": "admin",
    "value.converter.schema.registry.url": "",
    "insert.mode": "upsert",
    "key.converter.schemas.enable": "false"

And one more thing is that I want to sink timestamp in the table as well as a separate column but that column is not present in the AVRO schema. It’s a default timestamp of the topic record.

Any help, suggestion appreciated.

Thank you.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.