You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by 杨量(上海-技术部-开发) <li...@feiniu.com> on 2020/09/29 02:50:01 UTC

CaptureChangeMySQL cannot capture update for 4 tables join

HI,
 I'm working on CaptureChangeMySQL processor with nifi version 1.11.4.  I just capture update event of one table when I capture update for 4 tables join.
 The below is my sql.  

      UPDATE sub_orders_1001_1 s
            inner join main_order_1001 m on m.main_order_id=s.main_order_id
            left join sub_order_mc_1001 ms on ms.sub_order_id=s.sub_order_id
            left join order_promotion_info_1001 p on p.sub_order_id=s.sub_order_id
           set
              s.merchant_id='1' 
              , s.merchant_store_id=100
                , s.store_sales_type=m.store_sales_type
                , s.store_channel_id=100
                , s.presell_type=m.order_type
                , ms.store_sales_type=m.store_sales_type
                , ms.order_type=m.order_type
                , p.store_sales_type=m.store_sales_type
                , p.presell_type=m.order_type
  where  s.id between 1 and 100 and s.source=1 and s.merchant_id=''
  I would like to capture the binlog change of mysql for this sql.
  This is my main config of CaptureChangeMySQL, I think it is right.
  
  Table Name Pattern regex:  main_order\w*| sub_orders\w*| order_promotion_info\w*
  Retrieve All Records:  false
  Include DDL Events:   false
  
  But the wrong behavior is I just capture the binlog change of table order_promotion_info_1001. Cannot capture the change of sub_orders_1001_1.
  Where is this mistake? For binlog I'm new, but, Isn't it a row by row?
  Could you help me to point the way?

Thanks!

Paul Yang