Uploaded image for project: 'Kafka Connector'
  1. Kafka Connector
  2. KAFKA-97

Configuration for MongoDB Kafka Connect Connector to avoid {"_id": {"$numberLong": "11111111"}

    • Type: Icon: New Feature New Feature
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.1
    • Component/s: None
    • None
    • Environment:
      MongoDB: 3.6.17, Kafka Connector 1.1

      I am using the attached configuration on the source side and I am seeing the following in the Kafka topic:

      {}
      "somefield": {"$numberLong": "2342423432432432434324"}
       
      is there a way we can have the data formatted like this: "somefield": 2342423432432432434324".
       
      Attached config uses StringConverter, but I have tried JSON as well as Avro with the following configuration
       
      "key.converter":"io.confluent.connect.avro.AvroConverter",
      "key.converter.schema.registry.url":"http://schema-registry:8081",
      "value.converter": "io.confluent.connect.avro.AvroConverter",
      "value.converter.schema.registry.url":"http://schema-registry:8081"
       
      Thanks in advance.
       
       
      {}

        1. sink_config.json
          3 kB
          Sabari Gandhi
        2. source_config.json
          1.0 kB
          Sabari Gandhi

            Assignee:
            Unassigned Unassigned
            Reporter:
            sabari.mgn@gmail.com Sabari Gandhi
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: