Skip to Content
0
Former Member
Nov 24, 2015 at 12:42 PM

Flexible Query in Impex Export

2013 Views

I need to export certain product data using Impex Export in Hybris (4.7.9). I am using the below script:

insert_update Product; catalogVersion(catalog(id),version)[unique=true]; code[unique=true];

"#% impex.exportItems(""SELECT {P:pk} FROM {Product as P}, {CatalogVersion as CV}, {Catalog as C} WHERE {P:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND {C:id}='master' AND {CV:version}='Staged' AND {P:code} like 'ALB%'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1 );"

But I am getting the following error when I use the flexible search query in the Impex Export script:

No valid line type found for {0="#% impex.exportItems(""SELECT {P:pk} FROM {Product as P}, {CatalogVersion as CV}, {Catalog as C} WHERE {P:catalogversion}={CV:PK} AND {CV:catalog}={C:PK} AND {C:id}='master' AND {CV:version}='Staged' AND {P:code} like 'ALB%'"", Collections.EMPTY_MAP, Collections.singletonList( Item.class ), true, true, -1, -1 ), 1="}

Please let me know if anyone has information how this can be resolved.