Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-925

Fix documentation of 'array.encoding' option

    Details

      Description

      I am having below error when trying load data from mongodb to kafka
      config file

      name=s-kafka
      connector.class=io.debezium.connector.mongodb.MongoDbConnector
      tasks.max=1
      database.list=mongo1.backend.alpha.redmart.com:27017
      connection.url=mongo1.backend.alpha.redmart.com:27017
      mongodb.hosts=mongo1.backend.alpha.redmart.com:27017
      mongodb.name=oship
      collection.whitelist=dmdb.shipments_kafka
      database.whitelist=dmdb
      converter.class=org.apache.kafka.connect.json.JsonConverter
      key.converter=org.apache.kafka.connect.json.JsonConverter
      value.converter=org.apache.kafka.connect.json.JsonConverter
      key.converter.schemas.enable=false
      value.converter.schemas.enable=false
      internal.value.converter=org.apache.kafka.connect.json.JsonConverter
      #plugin.path=share/java/
      transforms=unwrap
      transforms.unwrap.type=io.debezium.connector.mongodb.transforms.UnwrapFromMongoDbEnvelope
      transforms.unwrap.array.encoding=struct
      transforms.unwrap.flatten.struct=true
      #transforms.unwrap.flatten.struct.delimiter=_

      Error:

      [2018-09-27 14:06:59,707] ERROR The 'array.encoding' value 'struct' is invalid: Value must be one of array, document (io.debezium.connector.mongodb.transforms.UnwrapFromMongoDbEnvelope:1817)
      [2018-09-27 14:06:59,707] ERROR Failed to start task mship2-0 (org.apache.kafka.connect.runtime.Worker:455)
      org.apache.kafka.connect.errors.ConnectException: Unable to validate config.
      at io.debezium.connector.mongodb.transforms.UnwrapFromMongoDbEnvelope.configure(UnwrapFromMongoDbEnvelope.java:241)
      at org.apache.kafka.connect.runtime.ConnectorConfig.transformations(ConnectorConfig.java:251)
      at org.apache.kafka.connect.runtime.Worker.buildWorkerTask(Worker.java:495)
      at org.apache.kafka.connect.runtime.Worker.startTask(Worker.java:451)
      at org.apache.kafka.connect.runtime.distributed.DistributedHerder.startTask(DistributedHerder.java:873)
      at org.apache.kafka.connect.runtime.distributed.DistributedHerder.access$1600(DistributedHerder.java:111)
      at org.apache.kafka.connect.runtime.distributed.DistributedHerder$13.call(DistributedHerder.java:888)
      at org.apache.kafka.connect.runtime.distributed.DistributedHerder$13.call(DistributedHerder.java:884)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                jpechanec Jiri Pechanec
                Reporter:
                hariprasad1 Hariprasad A
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: