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

field.exclude.list in MongoDB Connector v2.0 doesn't accept * as a wildcard for collectionName

XMLWordPrintable

    • False
    • None
    • False

      From the documentation:

      https://debezium.io/documentation/reference/2.0/connectors/mongodb.html#mongodb-property-field-exclude-list

      An optional comma-separated list of the fully-qualified names of fields that should be excluded from change event message values. Fully-qualified names for fields are of the form databaseName.collectionName.fieldName.nestedFieldName, where databaseName and collectionName may contain the wildcard * which matches any characters.

      but config with: "field.exclude.list": 

      *.*.Payload

      will result in error:

      The 'field.exclude.list' value is invalid: *.*.Payload has invalid format (expecting <databaseName>.<collectionName>.<fieldName>.<nestedFieldName>)

       

      and in the code:
      https://github.com/debezium/debezium/blob/main/debezium-connector-mongodb/src/main/java/io/debezium/connector/mongodb/MongoDbConnectorConfig.java

      protected static final Pattern FIELD_EXCLUDE_LIST_PATTERN = Pattern.compile("^*\(?:
      .\\w\
      .\\w\)(
      .\\w\+)
      s$");

      the pattern doesn't allow for '*' in collectionName.

              Unassigned Unassigned
              alon_rh Alon Prantsipal (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: