on 06-27-2019 5:13 PM - last edited on 02-04-2024 6:46 AM by postmig_api_4
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.