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

Table column metadata is not fetched when table name has a '/' character

XMLWordPrintable

      When setting the table.include.list with a table that includes a / character, the table column metadata is not properly fetched if the database user has access to more tables that what are being captured due to a different code path that relies on the table name pattern.

      Create two tables

      connection.execute("CREATE TABLE debezium.LOCATIONS (id numeric(9,0) primary key, data varchar2(50))");
      connection.execute("""
                          CREATE TABLE debezium."/TEST/WAREHOUSES_1000"
                          (
                                  warehouse_id NUMBER
                          GENERATED BY DEFAULT AS IDENTITY START WITH 10
                          PRIMARY KEY,
                          warehouse_name VARCHAR( 255 ) ,
                                  location_id    NUMBER( 12, 0 ))
                          """);
      TestHelper.streamTable(connection, "\"/TEST/WAREHOUSES_1000\"");
      

      Connector configuration:

      Configuration config = TestHelper.defaultConfig()
                          .with(OracleConnectorConfig.TABLE_INCLUDE_LIST, "DEBEZIUM./TEST/WAREHOUSES_1000")
                          .with(SchemaHistory.STORE_ONLY_CAPTURED_TABLES_DDL, "true")
                          .build();
      

      Yields the following error

      io.debezium.DebeziumException: Unable to find relational table model for 'FREEPDB1.DEBEZIUM./TEST/WAREHOUSES_1000', there may be an issue with your include/exclude list configuration.
          at io.debezium.relational.RelationalSnapshotChangeEventSource.createSchemaChangeEventsForTables(RelationalSnapshotChangeEventSource.java:447)
          at io.debezium.relational.RelationalSnapshotChangeEventSource.doExecute(RelationalSnapshotChangeEventSource.java:176)
          at io.debezium.pipeline.source.AbstractSnapshotChangeEventSource.execute(AbstractSnapshotChangeEventSource.java:102)
          at io.debezium.pipeline.ChangeEventSourceCoordinator.doSnapshot(ChangeEventSourceCoordinator.java:301)
          at io.debezium.pipeline.ChangeEventSourceCoordinator.doSnapshot(ChangeEventSourceCoordinator.java:285)
          at io.debezium.pipeline.ChangeEventSourceCoordinator.executeChangeEventSources(ChangeEventSourceCoordinator.java:196)
          at io.debezium.pipeline.ChangeEventSourceCoordinator.lambda$start$0(ChangeEventSourceCoordinator.java:147)
          at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
      

              ccranfor@redhat.com Chris Cranford
              ccranfor@redhat.com Chris Cranford
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: