How can I query AEM against a dataset to verify it is imported? | Community
Skip to main content
August 23, 2023
Solved

How can I query AEM against a dataset to verify it is imported?

  • August 23, 2023
  • 1 reply
  • 623 views

I have a list of file names in Excel and would like to link to the SQL back end to verify each of those file names exists in AEM.  How can I accomplish this?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Harwinder-singh

@sidcharming You can find how to setup groovy console here - 

https://medium.com/@ramamity94/update-jcr-on-live-environment-and-much-more-using-aem-groovy-console-c86f032de250

https://adobecommunity.com/pdf/meetup-1/AEM_Groovy_Console.pdf

 

https://aemgeeks.com/aem-tools/use-groovy-script-in-aem/

 

Some cool groovy scripts examples can be found here - 

https://hashimkhan.in/aem-adobecq5-code-templates/groovy-script/

 

Other way out would be to use ACS commons MCP if you don't have groovy console installed in your AEM environment already. 

https://adobe-consulting-services.github.io/acs-aem-commons/features/mcp/index.html

https://kiransg.com/tag/mcp/

 

Hope this helps.

 

1 reply

Harwinder-singh
Community Advisor
Community Advisor
August 23, 2023

@sidcharming I am not sure if i understand this correctly. Assuming that you have an excel containing a list of AEM resources (assets most likely) and you need to know if each of them exists in AEM or not, you can use any of the following based on your actual use case -

 

  1. If it is just AEM assets, you can simply get an assets report from AEM as an excel and you can compare your excel data with the Assets report excel via a simple vlookup. Refer to this - https://adobe-consulting-services.github.io/acs-aem-commons/features/mcp-tools/asset-report/index.html
  2. If the amount of files in the excel is substantial and you have just the file names (and not the exact AEM path), you can even consider creating a simple groovy script or a Managed control process (MCP) to read the excel file names and create a JCR query to search for the file names.
  3. If the excel entries are exact jcr paths to the files, you can use the AEM ACS Commons report builder references report - https://adobe-consulting-services.github.io/acs-aem-commons/features/report-builder/index.html

Hope this helps.

August 23, 2023

Thank you @harwinder-singh, The list I have is just file names and it is in quantity of 45,000 names.  I am new to AEM and feel your second option is what I'll need to do.  Where do I go to learn how to do the Groovy scripting? 🙂

Harwinder-singh
Community Advisor
Harwinder-singhCommunity AdvisorAccepted solution
Community Advisor
August 23, 2023