cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Document ID (partof) for Address not working during import of Orders with address

Former Member
0 Likes
545
 INSERT_UPDATE Address;owner(Customer.uid)[unique=true];&addressREF;firstname[unique=true];lastname[unique=true];streetname[unique=true];postalcode[unique=true];town[unique=true];country(isocode)[unique=true];billingaddress[default=true]    
 ;owner.id;addr1;first;last;street;postal;town;country;
 ;owner.id2;addr2....

 INSERT_UPDATE order;code[unique=true];deliveryAddress(&addressREF)
 ;12345;addr1
 ;12346;addr2

The above code creates an address and updates an existing order with this address as deliveryAddress. If this code is executed, everything is fine BUT multiple lines result in this error:

  INSERT_UPDATE order;code[unique=true];deliveryAddress(&addressREF)
 ,8797797253165,,,column 2: cannot resolve value 'addr1' for attribute 'deliveryAddress';<ignore>12345;addr1

Am I doing something wrong here, does anybody has an idea? Since I have a few thousand lines to import I don´t want to do every line by itself.

Lets assume I import 1000 addresses this way, than 1000 are created and around 500-600 are assigned. If I do the import another time still 1000 items created and around 650-750 addresses are assigned.

I also did this import with only 1 worker.

Hope anybody can help.

Best,

Marco

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Likes

Hello all,

the local.properties key "impex.import.workers" directly changes the "max threads" variable to 1 as only 1 worker is available. The problem is still present and has nothing to do with multi-threaded processing, wich is kind of unfortunate since I wished it would be this easy.

I also did another test where I assigned the same addresses to customers and the astonishing result is, that there is no error. All addresses are assigned no problem to the customers. This lets me think that Hybris is capable of handling such amount of REF´s and multi-threaded processing is in fact not the problem (I did the address to customer import with 8 threads)

Former Member
0 Likes

HI Marco, are you running your import via hotfolder? I remember that had a separate setting and was not expecting the impex.import.workers property (at least in version 6.5). Anyway, if it's not the multi-threaded issue, perhaps you're right that there's some kind of bug in impex processor when large amount of document refs are involved. I remember my failing impexes having also multiple references.

Former Member
0 Likes

Hey Łukasz, yes I am running the import via hotfolder. I had the feeling that this might cause the problem and converted it to an big impex file and in addition I converted it so that the every line has its own header. This in fact improved the import and reduced the problem but still there are some line (addresses) which are not correctly resolved and throw the above error. I am still unable to figure out why. Btw the import is ending in in the fourth pass "Aborting further passes (at pass 4)". So in the second run there are some refs that could be resolved and that needed to be resolved (otherwise it would end at pass 3). So I think Hybris is resolving most of the refs in second pass and SOMETHING deletes some knowledge about some refs. This is why it is not predictable. Looking forward to newer versions of hybris, hopefully this bug disappears magically.

Former Member
0 Likes

I have faced similar issue a couple of times and my strong suspicion is that it has to do with multithreaded impex processing. The issue seemed non-deterministic and sometimes different lines were ending-up with errors. Try running your impex from HAC and set the "Max. threads" setting to 1. This should allow you to check if the impex is in fact correct and the issue is with multi-threaded processing.

geffchang
Active Contributor
0 Likes

+1 for this. But if it doesn't fix the issue, then there's something else going on.

At first I was confused with what you meant by "only 1 worker", but now I think you meant the local.properties key for workers. I suggest you also try 's suggestion and make sure the number of threads in the UI is 1.

Iif using HMC, there's "Number of processes":

I assume there's something similar for backoffice.