1. 程式人生 > >使用Update Strategy組件無法進行delete操作

使用Update Strategy組件無法進行delete操作

ppi 沒有 nbsp app attribute 註意 ssi xxxxx http

問題:

  Update Strategy組件根據字段值對目標表進行DD_DELETE操作時失效

  同時,session log中報錯:Target table [XXXXXXXX] does not allow INSERT

原因:

  Session Properties中對"Treat source rows as"項目沒有設定為"Data driven",Session創建時,默認選擇是Insert

  在Update Strategy組件中配置的是DD_DELETE,要進行刪除操作,而該選項卻是Insert

  因此會在session log中提示Target table [XXXXXXXX] does not allow INSERT(session要insert,但mapping卻要delete,它們矛盾了)

解決方法:

  使用Update Strategy組件對目標表進行增刪改操作需進行以下配置:

    1) 在Update Strategy組件的Update Strategy Expression中使用"DD_DELETE",需註意的是要在Target將刪除key設為主鍵

    2) 在Session的Properties選項卡中,將"Treat source rows as"項目設定為"Data driven"

    3) 在session的Mapping選項卡中,將目標表的Properties的Attribute的Delete選項選中

  技術分享圖片

  技術分享圖片

使用Update Strategy組件無法進行delete操作