How to apply tag to multiple assets in one go
Hi All,
I have 10000 plus assets under "/content/dam/xxx", I want to apply a tag to all these assets.
Can anyone tell me the procedure?
Hi All,
I have 10000 plus assets under "/content/dam/xxx", I want to apply a tag to all these assets.
Can anyone tell me the procedure?
Hi @vani1012 ,
1. Write a query to fetch the desired assets. Example:
select * from [dam:Asset] as a where isdescendantnode(a, '/content/dam/xxx')
2. If you don't have any services implemented to get all asset paths in CSV try to utilize ACS AEM Commons Report Builder
and use the above query to fetch asset paths. Execute and Download the Report.
3. Now you may utilize the downloaded CSV in Metadata Import Tool, by providing appropriate headers and correct values in the tag property.
Alternatively, you can create a Job that uses keyset paginated queries to iterate over search results and apply tags to asset and commit in batches.
Resources:
Metadata Import Tool: Using Metadata Import and Export in AEM Assets | Adobe Experience Manager
Key Set Pagination: https://jackrabbit.apache.org/oak/docs/query/query-engine.html#keyset-pagination
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.