How to ignore blank fields in Transform Map?

tahnalos
Kilo Sage

So I'm doing my 10th import into a very large table (10,000 entries) and I notice that this latest dump has half the rows missing a bunch of fields.  As a result, when I perform this import, it overrides the data already in the table with blanks.  I have asked for a more complete dump but due to the urgency of this import (they want the data that is populated in the table ASAP), I need to come up with a solution that will allow me to ignore certain field imports if the field in the map is blank.  Obviously, I need a field level import but not sure how to pull it off.  Splitting the import will not be an option as some of these fields that are missing data are not mutually exclusive  meaning the split would need to be complicated.

Ideas?

 

9 REPLIES 9

Dhananjay Pawar
Kilo Sage

Hello Tahnalos


Use this script in the onBefore transform script

 

if(source.u_field1 == '' && source.u_field2 == '' && source.u_field3 == '')


{


ignore = true;


}

 

you will have to repeat the OR condition for all the fields you wanted to check with.


If you like my answer please mark it as Helpful and correct.

Thanks,

Dhananjay.

That's not what I want.

We want the import to go ahead, but only with the fields that has value.  If the import field has no value, the FIELD should not be imported but the rest of the data should go ahead.

We need to do this because the latest drop is missing pieces of data and instead of waiting for a more complete drop which could take weeks, we want to import what data we have.  However, the blank fields are overwriting those fields that actually have data which is what we don't want.

Devyani_6
Mega Guru

Hi,

 

Following link might be helpful.

Tranform maps questions

Regards,
Devyani

Of interest is the option "Copy Empty Fields" in which if left unchecked, it should NOT override fields that have value if the import field is blank.  That option appears to not be working.

DirkRedeker
Mega Sage
Hi What about the system property, I mentioned above. That will solve your issue. Did you give it a try? Let me know. BR Dirk