Question

Is there any way to exist check in migration rule?

  • 22 September 2020
  • 3 replies
  • 142 views

Userlevel 4
Badge +10
  • Hero (Employee)
  • 60 replies

Hello,

I created a migration for insert rows to product structure. But i need to exist check on migration rules or something like that. Because when i use twice same migration about my case, the rows created twice. So i dont want to do this.

I need a little bit help for avoid this situation. If the row values are exist than it should try to only modify instead of new.

Best regards.

 


3 replies

Userlevel 4
Badge +8

You need to ensure you have all of the P and K attributes of the view mapped to your source data.

 

If you don't have the values in the source then use a function within your SOURCE or DEFAULT to perform a lookup for each value.

 

 

Userlevel 7
Badge +24

Make sure you migrate (define) both BOM_TYPE and BOM_TYPE_DB -

for example, BOM_TYPE_DB =M and BOM_TYPE = “Manufacturing”. 

If you only migrate one of them, it interprets the other as null when it does the match, and therefore it decides to create a new record.

(This is only a problem when the _DB field is a key field)

Userlevel 2
Badge +5

Also you can define your own “P”s and “K”s under Method List Attribute… if you know your unique columns. Helps in auto generated key situations such as from sequences.

Reply