cancel
Showing results for 
Search instead for 
Did you mean: 

Datahub impex generation is not in sequence?

Former Member
0 Kudos

Hi All,

When i am seeding data to hybris via datahub backoffice quick upload the sequence in which output impex generated is not the same the input is provided.

Example:

Input Data

 categoryId,categoryDescription,productHierarchy,isDeletedFlag
 "A","AAAAA","",""
 "B","BBBBB","",""
 "C","CCCCC","",""
 "D","DDDD","",""
 
 Output 1:
 
 INSERT_UPDATE Category;;catalogVersion(Catalog(id),version)[unique=true];name;description;supercategories(code,catalogVersion(catalog(id),version));code[unique=true]
 ;1;ProductCatalog:Staged;BBBBB;BBBBB;<ignore>;B
 ;4;ProductCatalog:Staged;AAAAA;AAAAA;<ignore>;A
 ;3;ProductCatalog:Staged;DDDD;DDDD;<ignore>;D
 ;2;ProductCatalog:Staged;CCCCC;CCCCC;<ignore>;C
 
 Output 2:
 
 INSERT_UPDATE Category;;catalogVersion(Catalog(id),version)[unique=true];name;description;supercategories(code,catalogVersion(catalog(id),version));code[unique=true]
 ;7;ProductCatalog:Staged;AAAAA;AAAAA;<ignore>;A
 ;8;ProductCatalog:Staged;BBBBB;BBBBB;<ignore>;B
 ;6;ProductCatalog:Staged;CCCCC;CCCCC;<ignore>;C
 ;5;ProductCatalog:Staged;DDDD;DDDD;<ignore>;D
 
 Output 3
 
 INSERT_UPDATE Category;;catalogVersion(Catalog(id),version)[unique=true];name;description;supercategories(code,catalogVersion(catalog(id),version));code[unique=true]
 ;17;ProductCatalog:Staged;AAAAA;AAAAA;<ignore>;A
 ;15;ProductCatalog:Staged;DDDD;DDDD;<ignore>;D
 ;19;ProductCatalog:Staged;BBBBB;BBBBB;<ignore>;B
 ;13;ProductCatalog:Staged;CCCCC;CCCCC;<ignore>;C

Could someone please help us how to get impex generated in the same sequence as input is provided?

Thanks,

G Gopinath

former_member620692
Active Contributor
0 Kudos

Hi - I can't tell the complete answer without doing some research.

But, why is it a concern for you? Irrespective of the sequence of value lines, Hybris will import the ImpEx in one or more passes.

bidyadhar_tripathy
Participant
0 Kudos

Hi Arvind,

We need to remove category hierarchy in sequence where the first line should be root category after that child categories will be there.

If we put child category in first line, we are getting error in hybris console but all categories are getting removed.

This is related to question : https://answers.sap.com/questions/12772192/impex-order-issue.html?childToView=12834844#comment-12834...

Accepted Solutions (0)

Answers (1)

Answers (1)

Slava
Advisor
Advisor
0 Kudos

Short answer it's not possible..DataHub does not maintain sequence of the input records.

Each record loaded represents an item and we do not support dependency between items of the same type, e.g. if we have Category A and Category B - they are independent of each other and therefore it does not matter in which order they are loaded. That allows us to perform concurrent data processing in parallel threads under the hood and speed up the loading/composition/publication processes. Sure the output looks prettier but the price is 10 multiples slower application.

However there are sometimes cases when dependency exists between items of different types, e.g. Unit must be created before Product; or even between items of the same type in cases of self-references, e.g. Category C may have Category A and Category B as its supercategories. In the former case we offer declaration of dependency between target item types:

 <item>
     <type>DependentCategory</type>
     ...
     <dependencies>
         <dependency>ApparelDependentProduct</dependency>
     </dependencies>
     ...
 </item>

which guarantees correct order of their impex blocks in the impex file.

For the self-reference case a custom GroupingHandler should be created to correctly split raw item together and then compose an item with self-references based on those groups

Hope this helps