3 Replies Latest reply on Dec 28, 2012 2:51 PM by Krishna Kancherla

    How to import 20,000 of articles into DAM?

    apark2900

      Hi,

       

      I developed a web page in CQ which dynamically queries articles that I want to display on this page.

      I manually added 20 articles into DAM for the demo.

       

       

      Now, we have about 200,000 articles with content, title, author, date, category#, imagePath as fields.

       

      How can I import this database into DAM?

       

      What kind of format does DAM support?

        • 1. Re: How to import 20,000 of articles into DAM?
          orotas Level 4

          I am a little unclear - why are trying import these articles into the DAM? Do they have some sort of asset associated to them - are they PDFs or just text & images? Normally articles would not be imported into the DAM you would mode them as CQ Pages.

           

          To answer your question directly the DAM will generally support any binary file format. In addition to storing the binary file and it's renditions it wraps that in meta-data. You can also add whatever additional metad-data you want onto the node.

           

          If your article doesn't have an asset related to it I'd recommend modeling it as a CQ page rather than a DAM asset.

           

          In either case the path to import bulk data depends on the source and your own preferences:

          • You can write an OSGI servlet that accesses your source data and persists it in the right format using the JCR & Sling APIs. If you go down this path you want to make sure you implement a batch save method where you only commit data (session.save) ever 1000 items or so.
          • You can use the Sling post servlet and curl to persist data to the repository. This is the slowest method but it can execute without deploying code to CQ.
          • You can use scripting languages or Maven to take your source data and format it as CQ Vault XML and then generate a package with the XML and use package manager to import.
          • For DAM only if you are bulk loading binary files you can use WebDAV. That doesn't help with meta-data however it will get the binary loaded.
          • 2. Re: How to import 20,000 of articles into DAM?
            apark2900 Level 1

            Hi Orotas,

             

            This is GREAT INFORMATION!! Thank you so much.

             

             

            I am a newbee in CQ, so forgive me if I am wrong. In my understanding, the articles are kind of asset, because editors should browse them and can modify anytime they want.

             

            All the data in 6 fields(title/category/content/author..) of each article entity are text, no image or anything.

             

            Do I still have to model this as a CQ page?

            • 3. Re: How to import 20,000 of articles into DAM?
              Krishna Kancherla Level 1

              If you need them to editable then you have to migrate them in to CQ page, for that you need a template to be created with the article look and feel. Based on the node structure of the template you can create migration script to import the articles into CQ.