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

How to export flexible search query result as a CSV from HAC or HMC ?

Former Member
0 Likes
7,601

Hello Experts,

How to export below flexible search query result as a CSV from HAC or HMC ?

  select {cp.name},{cp.uid},{pg.uid},{csp.position},{csp.uid} from {ContentPage as cp join  ContentSlotForPage as csp on {csp.page}={cp.pk} join PageTemplate as pg on {cp.masterTemplate}={pg.pk} }

Hybris version - 5.7 Thanks, Nagarjuna.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member

Go to Hac->Console->Impex Export and use something like this:

  "#%impex.getImpExExportWriter().getExportWriter().setFieldseparator(',');"
  INSERT_UPDATE Category;code;description
  "#% impex.exportItemsFlexibleSearch(""Select {c.code},{c.description} from {Category as c}"");"
 
knallapati
Explorer
0 Likes

this was failing as it is expecting pk as the first column. Here is the working one for me.

"#%impex.getImpExExportWriter().getExportWriter().setFieldseparator(',');"
INSERT_UPDATE Category;pk;code;description"#% impex.exportItemsFlexibleSearch(""Select {c.pk},{c.code},{c.description} from {Category as c}"");"