Query Packager: A Quick Review

AEM_Podcast_QueryPackager_QuickReview
We did a podcast about the Query Packager with Justin Edelson, Co-Project Lead for ACS Adobe Experience Manager Commons and ACS AEM Tools, in which we talked at length about the usefulness of this feature.

What is it?
From the ACS GitHub page about Query Packager: “ACS AEM commons Query Packager facilitates the creation of CQ Packages based on XPath, JCR-SQL, JCR-SQL2, or QueryBuilder query results.”

How it works
Using one of the three JCR query languages, you can generate a high-level package definition. Adobe Experience Manager will execute this query and build the list of matching paths into a package for you. This is obviously a pretty abstract exercise and finding the correct way to apply it can be challenging sometimes. See the ACS GitHub page for a breakdown of how to use it. The page includes instructions and several screenshots.

Audience Impact (Devs, Admins)

  • Devs – Help admins make sense of query languages. They might use it to package things up and share around with other people on the project.
  • Admins – Define queries in XPath, JCR-SQL, or JCR-SQL2 that captures the nodes that you are interested in, but admins often are not intimately familiar with these query languages, in the JCR-specific forms. That is where they need assistance from the devs.

Example application
Content Sync – This is how we get prod content back on to the QA and staging environments for validation of new code releases. Because the content is a living product and constantly changing on prod, we could not define a fixed set of paths, which makes this tool perfectly suited for this purpose.