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

Add support for custom SourceInfoStructMaker for adding new fields to source field


    • False
    • None
    • False

      In order to make your issue reports as actionable as possible, please provide the following information, depending on the issue type.

      Bug report

      For bug reports, provide this information, please:

      What Debezium connector do you use and what version?


      What is the connector configuration?


      What is the captured database version and mode of depoyment?

      (E.g. on-premises, with a specific cloud provider, etc.)

      <Your answer>

      What behaviour do you expect?

      <Your answer>

      What behaviour do you see?

      <Your answer>

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

      (Ideally, also verify with latest Alpha/Beta/CR version)

      <Your answer>

      Do you have the connector logs, ideally from start till finish?

      (You might be asked later to provide DEBUG/TRACE level log)

      <Your answer>

      How to reproduce the issue using our tutorial deployment?

      <Your answer>

      Feature request or enhancement

      For feature requests or enhancements, provide this information, please:

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

      Adding new fields to source fields is done using SMTs. However, SMTs affect overall performance. Based on our testing, we observed that SMT introduced a 20% performance regression because it requires new records to be recreated with new schemas. 

      In each connector, the source field schema and its value are created using a custom implementation of

      `AbstractSourceInfoStructMaker`. Custom AbstractSourceInfoStructMaker allows for the addition of new fields to the source field with little/no impact on performance. In order to use custom AbstractSourceInfoStructMakers, connectors need a way to use custom connector config.

      Implementation ideas (optional)

      In case of postgres connector

      1. Create and return custom PostgresSourceInfoStructMaker that includes new additional fields in connector config.

      protected SourceInfoStructMaker<? extends AbstractSourceInfo> getSourceInfoStructMaker(Version version) {
          return new CustomPostgresSourceInfoStructMaker(Module.name(), Module.version(), this);
        2.  Return new SourceInfo schema in `CustomPostgresSourceInfoStructMaker#getSchema` and new add fields to SoruceInfo in `CustomPostgresSourceInfoStructMaker#struct` method

          3. Add ability return custom connector config in connector task.

            Unassigned Unassigned
            dasarianil1505 Anil Dasari
            0 Vote for this issue
            3 Start watching this issue