Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-36611

Add schema info to output of Kafka sink

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • cdc-3.3.0
    • cdc-3.3.0
    • Flink CDC
    • None

    Description

      Currently, the output of Kafka sink in debezium format looks like this:

      {
        "before": {
          "id": 4,
          "name": "John",
          "address": "New York",
          "phone_number": "2222",
          "age": 12
        },
        "after": {
          "id": 4,
          "name": "John",
          "address": "New York",
          "phone_number": "1234",
          "age": 12
        },
        "op": "u",
        "source": {
          "db": null,
          "table": "customers"
        }
      } 

      It contains record data with full before/after and db info, but schema info wasn't included. 

      However, In some scenarios, we need this information to determine the type of data. For example, Paimon's Kafka CDC source requires this type information, otherwise all types are considered String, refer to https://paimon.apache.org/docs/0.9/flink/cdc-ingestion/kafka-cdc/#supported-formats.

      Considering that this will increase the data load, I suggest adding a parameter to configure whether to enable it.

      Attachments

        Activity

          People

            Unassigned Unassigned
            kunni Yanquan Lv
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: