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

Add support for XML_TYPE column type to Debezium connector for Oracle (LogMiner)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • 2.4.0.Alpha1
    • 1.5.0.Final, 1.6.0.Beta1
    • oracle-connector
    • None
    • False
    • False
    • Undefined
    • Hide

       Create testDB in oracle 19c and execute following statements

      create table test_xml (
      id_f number,
      xml_f xmltype
      );
      ALTER TABLE test_xml ADD CONSTRAINT test_xml_pk PRIMARY KEY (id_f);
      ALTER TABLE test_xml ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS;
      insert into test_xml values (115,xmltype('<?xml version="1.0"?>
        <Warehouse>
        </Warehouse>'));

       Now initlize debezium connector like this :

      {
            "connector.class" :  "io.debezium.connector.oracle.OracleConnector",
            "database.connection.adapter":  "logminer",
            "tasks.max" :  "1",
            "database.server.name" :  "oracleserverxml3",
            "database.hostname" :  "IP",
            "database.port" :  "1521",
            "database.user" :  "dbzuser",
            "database.password" :  "****",
            "database.dbname" :  "ORCL",
            "database.history.kafka.bootstrap.servers" :  "IP:9092",
            "database.history.kafka.topic":  "schema-changes.inventory",
            "table.include.list":  "schema.TEST_XML"
      }
      

       After snapshot You will see regular data in id_f and xml_f columns.

      Then execute some insert on table 

      insert into test_xml values (117,xmltype('<?xml version="1.0"?>
       <Warehouse>
       </Warehouse>'));

      Now column id_f will be still correct but xml_f will be null. 

      Show
       Create testDB in oracle 19c and execute following statements create table test_xml ( id_f number , xml_f xmltype ); ALTER TABLE test_xml ADD CONSTRAINT test_xml_pk PRIMARY KEY (id_f); ALTER TABLE test_xml ADD SUPPLEMENTAL LOG DATA ( ALL ) COLUMNS ; insert into test_xml values (115,xmltype('<?xml version= "1.0" ?> <Warehouse> </Warehouse>'));  Now initlize debezium connector like this : {      "connector.class"  :   "io.debezium.connector.oracle.OracleConnector" ,      "database.connection.adapter" :   "logminer" ,      "tasks.max"  :   "1" ,      "database.server.name"  :   "oracleserverxml3" ,      "database.hostname"  :   "IP" ,      "database.port"  :   "1521" ,      "database.user"  :   "dbzuser" ,      "database.password"  :   "****" ,      "database.dbname"  :   "ORCL" ,      "database.history.kafka.bootstrap.servers"  :   "IP:9092" ,      "database.history.kafka.topic" :   "schema-changes.inventory" ,      "table.include.list" :   "schema.TEST_XML" }  After snapshot You will see regular data in id_f and xml_f columns. Then execute some insert on table  insert into test_xml values (117,xmltype('<?xml version= "1.0" ?> <Warehouse> </Warehouse>')); Now column id_f will be still correct but xml_f will be null. 

      Issue: Using debezium oracle connector with logminer for XML_TYPE column retrives only data from snapshot, during replication XML_TYPE column is null (other columns are fine)

      Environment:   

      DB host: Oracle linux 7

      DB version: Oracle 19c 

      Oracle connector: 1.6 Beta and 1.5 Final | using LogMiner

      Debezium on classic kafka and kafka connect 

      Expected result:
      Retrive XML_TYPE data in snpashot and during replication

      Actual result:
      Using snapshot everything works fine, during replication XML_TYPE columns are nulls

      Some investigation on this issue:

      Investigation can be found in my conversation with ccranfor@redhat.com under this thread. 

              ccranfor@redhat.com Chris Cranford
              domis97 Dominik Maciejewski (Inactive)
              Votes:
              3 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: