Skip to main content
Question

Is there any way to exist check in migration rule?

  • Sep 22, 2020 10:31 AM UTC
  • 3 replies
  • 205 views

0guz
Hero (Employee)
Forum|alt.badge.img+10

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

Mike.Hollifield
Hero (Partner)
Forum|alt.badge.img+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.

 

 


paul harland
Superhero (Employee)
Forum|alt.badge.img+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)


Rajith
Sidekick (Partner)
Forum|alt.badge.img+6
  • Sidekick (Partner)
  • Sep 25, 2020 9:55 AM UTC

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.