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

Add the original data type of a column as schema parameter

    Details

      Description

      In DBZ there are less data types then in MySql, and I assume that's by design for simplicity.
      But in some applications (mine, for instance), I need to support changes in the original types, and these might not be reflected by DBZ.
      For example, TINYINT may change from TINYINT(1) to TINYINT(4) and in DBZ we will have zero knowledge of this.
      It's important to say that in this case, TINYINT(1) which is basically the backend data type for Boolean in MySql will be mapped to INT8 in DBZ and I don't really have anyway to tell if a number is indeed a number or a boolean.

      More cases can be:

      • Differentiating data types MEDIUMINT and INTEGER in MySql (both mapped to DBZ's INT32),
      • NUMERIC and DECIMAL types
      • and more.

      If we had the original field somewhere in the event (perhaps under the "source" Struct) we would have all we need for consuming the data

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  gunnar.morling Gunnar Morling
                  Reporter:
                  orr.ganani Orr Ganani
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: