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

Avro schema lacks docs populated for fields with comments

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: Major Major
    • Backlog
    • None
    • debezium-core
    • None
    • False
    • None
    • False

      Which use case/requirement will be addressed by the proposed feature?

      Generated avro schema should have doc (description) populated for the fields that have comments in the database.

      Implementation ideas

      It appears that table columns metadata is not fully used in JdbcConnection::readTableColumn method, namely, column.comment() is not set.

      DatabaseMetaData::getColumns returns ResultSet with field #12 claimed to contain "REMARKS String => comment describing column (may be null)".

      This should do the trick:
      column.comment(columnMetadata.getString(12));

              Unassigned Unassigned
              dzagand Andrey D (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: