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

Bug in field.name.adjustment.mode Property

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.3.0.Final
    • 2.2.0.Final, 2.2.1.Final, 2.3.0.CR1
    • core-library
    • None

      Bug report

      When using version 2.2, "sanitize.field.names" property was replaced by "field.name.adjustment.mode". However, when running the connector, I got an error: "cannot create field because of field name duplication". I looked into the error log and it looks like when the property value of field.name.adjustment.mode is set to "avro" it replaces the first character of the affected columns with an underscore. This would most likely be the cause of the issue as if there are multiple columns with similar naming: e.g. '24ColumnName' and '44ColumnName', it will be converted into '_4ColumnName' and '_4ColumnName' causing duplicated column.

       

      https://debezium.io/documentation/reference/2.2/connectors/sqlserver.html#sqlserver-property-field-name-adjustment-mode

      What Debezium connector do you use and what version?

      SQL Server Connector version 2.2

      What is the connector configuration?

      "field.name.adjustment.mode": "avro"

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

      This issue doesn't exist in previous version 2.1 and prior versions.

      Implementation ideas (optional)

      Can you please adjust the implementation to simply include an underscore to the affected columns instead of replacing the first character with an underscore?

            rh-ee-mvitale Mario Fiore Vitale
            rap70r Rap70r Rap70r (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: