loserwang1024 commented on PR #4004:
URL: https://github.com/apache/flink-cdc/pull/4004#issuecomment-2872145316

   I have dedug this modification, it turns out.
   
   `jdbc.readTableNames(database, null, null, new String[] {"TABLE"})` will 
show sub partition tables:
   <img width="955" alt="image" 
src="https://github.com/user-attachments/assets/9aa8f45e-195f-499a-ba1b-43965c0572d9";
 />
   
   `jdbc.readTableNames( database, null, null, new String[] {"PARTITIONED 
TABLE"})` will show parents partition table:
   <img width="860" alt="image" 
src="https://github.com/user-attachments/assets/fe73e300-c9f6-43ba-839a-21e413f309a2";
 />
   
   Thus, if set `table-name` = 'inventory_partitioned.*',  both leaf tables and 
parents table are captured.
   <img width="1140" alt="image" 
src="https://github.com/user-attachments/assets/704595d9-de05-46a6-b0b4-58642bc7e587";
 />
   
   Thus, even though we can not publish_via_partition_root in this pr, a option 
to enable partition table is needed:
   ```java
    Set<TableId> allTableIds ;
           if(!partition) {
               jdbc.readTableNames(
                       database, null, null, new String[]{ "TABLE"});
           }else{
               jdbc.readTableNames(
                       database, null, null, new String[]{ "PARTITIONED 
TABLE"});
           }
   
   
   ```
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to