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

Avoiding hardcoded date value in MySQLDefaultConverter

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Unresolved
    • Major
    • under-triaging
    • None
    • mysql-connector
    • None
    • False
    • None
    • False
    • 0
    • 0% 0%

    Description

      In case MySQL has a 0000-00-00 value, here there is an hardcoded value: 

      https://github.com/debezium/debezium/blob/6e092d39f24632110968b28b4cd0618d57da0ac6/debezium-connector-mysql/src/main/java/io/debezium/connector/mysql/MySqlDefaultValueConverter.java#L181

       

      Is it possible to give a JDBC like strategy? such as:

      •  zeroDateTimeBehavior=ROUND
      •  zeroDateTimeBehavior=CONVERT_TO_NULL (and automatically make the field null)

      https://www.ibm.com/support/pages/jdbc-connector-mysql-sqlexception-abouttimestamp

      or apply any other kind of transformation?

       

      In my case I've decided to make the sink nullable, but for legacy reasons, the MySQL source cannot be made null. 

      I've 1000s of tables, so a more automated intervention would be great.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mark4912 Mark Mark (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: