Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

About import/export of table information in AEM

Avatar

Level 2

We would like to have a table (JSON or spreadsheet) with attribute information defined for each page URL, import that table in AEM, and export it to Publish in JSON or other format.

 

■Example
・URL: page-url-1
Attribute information 1 (category): Cloud computing
Attribute information 2 (target): For small and medium-sized businesses

 

・URL: page-url-2
Attribute Information 1 (Category): Digital Marketing
Attribute Information 2 (Target): For large companies

 

We would also like to export the table information registered in AEM, update it as needed, and import it again.

How can we achieve this kind of functionality in AEM?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@satoshi1 : Export/Import metadata is available for Assets OOTB.

https://experienceleague.adobe.com/docs/experience-manager-learn/assets/metadata/metadata-import-exp...

 

May be something similar can be developed for sites as well.


Aanchal Sikka

View solution in original post

3 Replies

Avatar

Community Advisor

Hi @satoshi1 

 

You would have to write two servlets. One for the reading of the spreadsheet or Json in AEM and second for exporting it as JSON.

 

Import: You can read both types of file either spreadsheet or Json from the file system or placing it inside DAM.

 

1. Create a POST servlet

2. Write the logic to read the sheet and the page URL mentioned in the sheet.

3. Read the corresponding attribute from the sheet and write the property or node in the JCR:content of the page

 

Here is the logic explained in the post to read the spreadsheet:

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/how-to-read-excel-file-dat... 

 

Export

 

Create a get servlet to read the page nodes and build your JSON structure. You can also use various OOB method defined in the below link.

 

https://experienceleague.adobe.com/docs/experience-manager-65/developing/components/json-exporter.ht...

 

Hope this helps.

Avatar

Correct answer by
Community Advisor

@satoshi1 : Export/Import metadata is available for Assets OOTB.

https://experienceleague.adobe.com/docs/experience-manager-learn/assets/metadata/metadata-import-exp...

 

May be something similar can be developed for sites as well.


Aanchal Sikka

Avatar

Level 2

@Avinash_Gupta_ @aanchal-sikka 

Thanks for letting me know.
It has been helpful, including past correspondence.

 

Since what we are trying to do this time includes non-AEM pages, I will set them as JSON in Adobe Collection Tags (Launch) and set them in DataLayer.