Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Saving JCR query results

lrao
Level 2
Level 2

I ran a JCR query by going to CRXDE Lite and get the results I want. Is there a way to extract or save the result set from the query into  either text or excel file?

1 Accepted Solution
smacdonald2008
Correct answer by
Level 10
Level 10

Out of the box -- no; however - you can write a custom CQ service.  That is one of the most powerful features of AEM -- the ability to customize it. 

We have community articles that will help you for this use case. 

See this community article that will help you write an OSGi bundle that knows how to query the AEM JCR using the JCR API:

http://scottsdigitalcommunity.blogspot.ca/2013/02/querying-adobe-experience-manager-data.html

See this community article that talks about how to get Excel functionality into CQ:

http://scottsdigitalcommunity.blogspot.ca/2013/08/creating-custom-excel-service-for-adobe.html

Then you can combine the app logic shown in the 2 articles - that is - you can search the AEM JCR using the JCR API. Then you can write the result set to an excel Spreadsheet using the Excel API as discussed in the 2nd link. 

Hope this helps

View solution in original post

4 Replies
justin_at_adobe
Employee
Employee

One option is to get the query results in JSON and then us jsawk (https://github.com/micha/jsawk) to transform the JSON result set into a CSV file.

smacdonald2008
Correct answer by
Level 10
Level 10

Out of the box -- no; however - you can write a custom CQ service.  That is one of the most powerful features of AEM -- the ability to customize it. 

We have community articles that will help you for this use case. 

See this community article that will help you write an OSGi bundle that knows how to query the AEM JCR using the JCR API:

http://scottsdigitalcommunity.blogspot.ca/2013/02/querying-adobe-experience-manager-data.html

See this community article that talks about how to get Excel functionality into CQ:

http://scottsdigitalcommunity.blogspot.ca/2013/08/creating-custom-excel-service-for-adobe.html

Then you can combine the app logic shown in the 2 articles - that is - you can search the AEM JCR using the JCR API. Then you can write the result set to an excel Spreadsheet using the Excel API as discussed in the 2nd link. 

Hope this helps

View solution in original post

jkpanera
Level 5
Level 5
This is an acceptable answer for an open source project, but it really isn't an acceptable answer for "enterprise" software
michaelt7736928
Level 1
Level 1

My team had the same issue. You can also use a Chrome Plugin such as the one below and clean up the data in excel.

 

https://chrome.google.com/webstore/detail/data-scraper/nndknepjnldbdbepjfgmncbggmopgden/related?hl=e...