AEM CQ5 Tutorials AEM CQ5 Tutorials

Show Navigation Hide Navigation
  • Home
  • Tutorials
    • AEM/CQ5 Tutorials
    • AEM Forms
  • Interview Questions
    • AEM/CQ5 Interview Questions
  • AEM Test Series
  • Contribute us

Asset Metadata AEM : Comprehensive Guide

Ankur Ahlawat January 15, 2018 Adobe AEM/CQ5 Tutorials, Tutorials

Asset metadata refers to extra data associated with assets that we upload in aem, which is used to describe an asset in more details. During migration the biggest challenge that a developer face is to migrate millions of asset with its associated metadata in aem.

In this tutorial we will see :-

  • What do you mean by metadata in aem.
  • What is the difference between Metadata Profiles and Metadata Schema.
  • Metadata Profiles in AEM.
  • Metadata Schema in AEM.

Asset metadata in aem:-


When ever we upload an asset (image, pdf, video, document etc..) in aem, aem runs its default workflow “Dam Update Asset” to create metadata for this asset and stores metadata in the form of properties on metadata node.

dam-update-asset-metadata-processor

For example:- Lets upload an asset in aemcq5tutorials folder. Then Dam Update Asset workflow will be triggered and its metadata will be stored under /content/dam/aemcq5tutorials/jcr:content/metadata .

metadata-asset-aem

Difference between Metadata Profiles and Metadata Schema in aem:-


Metadata Profiles are used if you have to apply default metadata value to assets within a folder. Means any asset that you subsequently upload to the folder inherits the default metadata that you configured in the Metadata Profile.

Metadata Schema is basically the properties of an asset that you see, it defines what  metadata properties displayed for assets that use the particular schema. Means if you want to display any custom property then you definitely need to use custom metadata schema.

Metadata Profiles in AEM:-


AEM 6.2 onward, the location where Metadata Profiles are stored in the repository has changed. Upon upgrading, they are moved from their location in AEM 6.1 at :

  • /apps/dam/ingestion/profiles/metadata

to a new location under:

  • /conf/global/settings/dam/adminui-extension/metadataprofile

Because of this if you are planning to upgrade from AEM 6.2 to AEM 6.3 you might need to do manual adjustments.

Create Metadata Profile in AEM:-
  • Login to AEM author Instance.
  • Navigate to Tools-> Assets-> Metadata Profiles
    metadata-profile-aem
  • Click Create and Enter title for your custom Metadata Profile.(For Ex:- Sample Profile)
    aem-assets-metadata-profiles
  • Metadata profile Edit form will be displayed.
  • You can create a custom property or configure any existing property over here. Let’s add default value to description property.
  • Select description property and add Default value to it.
    edit-metadata-profile-aem-asset

    • Map to Property: The value of this property provides the relative path/name to the asset node where it is saved in the repository. The value should always start with “./” because it indicates that the path is under the asset’s node.
  • Click Save.

After Saving your metadata profile, it will be save under /conf/global/settings/dam/adminui-extension/metadataprofile/sample-profile.

metadata-profile-crx-value

That’s it you have configured metadata profile. Let’s Apply it to a Folder.

Applying Metadata Profiles to a Folder:-

When you assign a metadata profile to a folder, any sub-folders automatically inherit the profile from its parent folder. This means that you can assign only one metadata profile to a folder. As such, consider carefully the folder structure of where you upload, store, use, and archive assets.

If you assigned a different metadata profile to a folder, the new profile overrides the previous profile. The previously existing folder assets remain unchanged. The new profile is applied on the assets that are added to the folder later.

There are two ways to assign Metadata Profile to a Folder:-

  • Navigate to Folder –> Properties –> Metadata Profiles
    apply-metadata-folder-properties
  • Navigate to Tools –> Assets –> Metadata Profiles –> Select the metadata profile that you want to apply to a folder or multiple folders.
    metadata-profiles-apply-folder

Note: If you update metadata profile, the existing assets can’t get updated with new metadata profile until we run “Dam Update Asset” workflow on them.

For More Details about configuring Metadata Profile click here 

Metadata Schema in AEM:-


As stated earlier metadata schema is used to defines the layout of the properties page and the metadata properties displayed for assets that use the particular schema. You can use the Metadata Schema Forms editor to modify existing schema or add custom metadata schema.

Create a custom metadata schema form:-

To create a custom metadata schema form, it is advised to copy an existing schema. It will save time for adding existing properties.

  • Navigate to Tools –> Assets –> Metadata Schema
    metadata-schema-aem
  • Select any existing metadata schema form, that you want to extend. You can create a blank metadata form also, if you don’t want to reuse exiting forms.
  • Click Copy. Enter name for new metadata schema.
    create-metadata-schema
  • Your new custom metadata schema form is created. You can edit it to add more custom properties.
  • Lets add one text field to it.
    • Form Right side Panel Drag and drop Single Line Text component on Form.
    • Select the newly dropped component.
    • Edit the component and add a Title, placeholder text as shown.
    • Edit Map to Property from ./jcr:content/metadata/default to your property name that you want to map against it.
      Note:- Map to Property specifies the relative path/name to the asset node where it is saved in the CRX repository. It starts with “./” because indicating that the path is under the asset’s node.
    • Click Save.
      custom-metadata-schema-editor
  • Apply this metadata schema to a folder.
  • Select custom metadata schema from Tools –> Assets –> Metadata Schema.
    apply-metadata-schema-forms
  • Select Apply to Folder and select Folder on which you want to apply.
    apply-metadata-schema-aem

That’s it you are done you have successfully applied custom metadata schema to your asset folder. You can check it by select properties of any asset under aemcq5tutorials folder.

test-custom-metadata-schema

For more information on metadata schema refer Adobe Docs here.

You can also create metadata schema based on MIME type of asset. For more information read Metadata schema form for custom MIME type

 

Related

Spread the love
     
AEM 6.3 AEM Basics Asset Metadata Metadata Profile Metadata Schema

Written by Ankur Ahlawat

I’m a AEM 6 Certified Lead Developer having 9+ years of industry experience and an active member of AEM community. Want to work together to help AEM community ? I’d love to hear from you. Just drop a mail at [email protected]

7 Responses to "Asset Metadata AEM : Comprehensive Guide"

  1. Simon Brown says:
    January 23, 2018 at 3:56 pm

    When I create or edit a schema. The author level role looses acces to see the properties on an asset. The console comes up blank as if the permissions have changed. Admins can see the properties console for an asset as expected Do you have any Idea what may be causing this in AEM 6.1?

    Reply
  2. SRK says:
    April 10, 2018 at 5:18 pm

    Thank you for the article. Can you please clarify below questions.

    1. Is there any way we can extend default schema instead of copying and adding our own properties so that in future we don’t have to copy the new changes from the future releases?

    2. If we customize default scehma, i can see large set of nodes are added under /conf/global/settings/dam/adminui-extension/metadataschema folder. I know we need to add this /conf/global/settings/dam/adminui-extension/metadataschema folder path to our project to deploy in each environment. Is there any best practice around it ?

    Reply
    1. Ankur Ahlawat says:
      April 12, 2018 at 3:45 pm

      1) Currently we don’t have any option to extend a schema, the only option is copying it.
      2) From AEM 6.4 all the configurations are moved to /conf , as per my understanding right now we have only this option.

      Reply
      1. SRK says:
        April 17, 2018 at 4:02 pm

        Thank you for the confirmation !

        Reply
  3. Heema Gupta says:
    April 21, 2020 at 8:09 am

    Hi Ankur,

    Can we create different metadata schemas for Word Doc or Excel file? Like we have one for PDF? I checked for the mime-types, but it handles more of images (png) formats. I’d like to know more about the documents.

    Reply
  4. Anirudh Joshi says:
    March 9, 2022 at 8:03 pm

    Ankur,
    What happens when we do an upgrade? Are the changes over written,Is the content tagged with custom properties lost etc? We are currently doing a fresh AEM install and planning to extend/create custom metadata for Assets but wanted to know how future upgrades and patch impact customizations

    Thanks
    Ani

    Reply
  5. Akhil Raj says:
    April 26, 2022 at 8:09 am

    in 6.3 Classic UI, we have dialogfieldset in asset customization, How we can achieve the same in TOUCH UI?

    After upgrade, it is breaking in classic and not present in Touc

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Subscribe to AEM CQ5 Newsletter

RSS Recent Posts

  • AEM Permissioning : Use Cases & Implementation May 2, 2022 Ankur Ahlawat
  • AEM Multi Module Project : Comprehensive Guide February 9, 2022 Ankur Ahlawat
  • Text Pre-Extraction in AEM : Comprehensive Guide April 5, 2021 Ankur Ahlawat
  • Test Scenario : Quick Publish vs Manage Publish AEM October 8, 2020 Ankur Ahlawat
  • AEM Sling Query : Comprehensive Guide August 10, 2020 Ankur Ahlawat
  • AEM Cloud Service – Overview January 28, 2020 Ankur Ahlawat
  • Duplicated OSGI Configurations after Upgrade November 8, 2019 Ankur Ahlawat

Popular Tags

301 redirect 302 redirect Adobe AEM AEM 6.1 AEM 6.3 AEM 6.4 AEM 6.5 AEM 6.x AEM Basics AEM Clientlibs AEM CQ5 Tutorials AEM Links AEM Plugin AEM Sample Questions AEM Shortcuts Asset Metadata Best Practices Certification Component core components CQ5 curl Custom Component File Vault HTL Installation Interview Questions Live Copy Maven MSM Multifield OSGI OSGI Bundles OSGI Configuration OSGI Services productivity Sightly Sling TarMK Template Touch UI User Permission Webdav Workflow

Trending Posts

Adobe Dumps
AEM Interview Questions
Sightly New Features
Create Website in AEM

Pages

  • About Us
  • AEM Discussion
  • Ask Question
  • Contribute us
  • Privacy Policy
  • Search
  • Terms and Conditions

RSS feed RSS - Posts

RSS feed RSS - Comments

© AEM CQ5 Tutorials | 2023 ALL RIGHTS RESERVED

Powered by Pinboard Theme and WordPress

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Cookie settingsACCEPT
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT