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

field.exclude.list doesn't accept dashes (-) in database name

XMLWordPrintable

    • False
    • None
    • False

      Bug report

      For bug reports, provide this information, please:

      What Debezium connector do you use and what version?

      Mongodb 1.9

      What is the connector configuration?

       

      "connector.class": "io.debezium.connector.mongodb.MongoDbConnector"
      "tasks.max": "3"
      "mongodb.ssl.enabled": "true"
      "mongodb.name": "corn"
      "key.converter": "org.apache.kafka.connect.storage.StringConverter"
      "key.converter.schema.registry.url": ""
      "key.converter.schemas.enable": "false"
      "value.converter": "org.apache.kafka.connect.json.JsonConverter"
      "value.converter.schema.registry.url": ""
      "value.converter.schemas.enable": "false"
      "collection.include.list": "messaging-microservice\\.(users)"
      "database.include.list": "messaging-microservice"
      # Exclude non-homogenous arrays
      "field.exclude.list": "messaging-microservice.users.location.geoJson"

       

      What is the captured database version and mode of deployment?

      Mongo server version 4.2.21.  On-premise

      What behaviour do you expect?

      To exclude location.geoJson from user records.   

      What behaviour do you see?

      When trying to update the config via the kafka-connect http interface, it errors on invalid connector configuration.

       

      {'error_code': 400, 'message': 'Connector configuration is invalid and contains the following 1 ' 'error(s):\n' 'messaging-microservice.users.location.geoJson has invalid format ' '(expecting ' '<databaseName>.<collectionName>.<fieldName>.<nestedFieldName>)\n' 'You can also find the above list of errors at the endpoint ' '`/connector-plugins/
      {connectorType}
      /config/validate`'}
      

       

      Do you see the same behaviour using the latest relesead Debezium version?

      Yes.  1.9 is latest stable.  2.0 still in development.  

      Debugging Notes

      I think the problem can be traced to this validation regex\w matches a-z, A-Z, 0-9, and _, but nothing in the regex will match the dash - in messaging-microservice.  

      Workarounds

      One workaround is to use a wildcard for the database name *.users.location.geoJson

       

              Unassigned Unassigned
              stebl Steve Blass (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: