Mass Extract Utility

Posted by Unknown on
Mass extract (massextract) is an OOB utility which can be used to extract data from any tables in WCS, this utility is extremely useful if you need to feed in data from WCS to another system.


Step 1

you have to write a filter definition file, this file will have the SQL query required to extract the data from WCS.
following is one sample filter file if you need to extract data from catentry and catendesc table (The tables which hold the item data and item description tables in WCS)
Refer to following link for more details on Extraction filter format

<sqlx>

    <!-- **************************** -->
    <!-- extract Category information -->
    <!-- **************************** -->

<functionDef id="Product" description="Extract Product"
schemaentity="catentry">
       <body>
        select * from catentry
      </body>
 </functionDef>

    <execute id="Product" description="Extract Product"
schemaentity="catentry">
      </execute>
   
</sqlx>

NOTE: In the extraction filter xml only one schemaentity is allowed for a single sql query, you can not write a query with complex joins as the tool would not know how to map it to the output xml.

Step2

Run the mass extract command from command prompt.
E.g.
C:\IBM\WCDE_ENT70\bin\massextract.bat -filter catentry_filter.xml -outfile catentry.xml -dbname wcs07 -dbuser wcs7 -dbpwd wcs7

This should generate catentry.xml output file consisting of records from catentry file.
E.g. extracted record

<catentry
    catentry_id="10001"
    member_id="7000000000000000051"
    catenttype_id="ProductBean"
    partnumber="Dummy Product"
    mfpartnumber="DummyProduct"
    mfname="Hari"
    markfordelete="0"
    lastupdate="2010-01-08 22:27:15.859"
    onspecial="0"
    buyable="1"
    baseitem_id="10001"
    optcounter="1"
/>


4 comments:

  1. Hi Hari,
    This article is so simple and fantastic. Keep up the good work and wishing you all good luck.

    ReplyDelete
  2. Hi Hari,

    Thank you for elaborating mass extraction utility in such a simple manner.

    I need to extract data for exporting it from WCS6 to WCS7. I had tried using default Migration Wizard that comes with WCS7, but it is not working. I had raised a PMR with IBM, but it was not useful.

    I have planned to export data using massextract utility, transform it, idres it and import it using massloader. For this, I need to have a sequence of SQLs that would help me while using massupload.

    Do you know this sequence or can you point me to right direction?

    Thanks again, for all the good work you are doing for newbies, like me.

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. The rise of mobile devices has made blogs and articles more accessible than ever before. Readers can access content on their smartphones or tablets, allowing them to stay informed and entertained while on the go. Work From Anywhere With A VPN? Writers must optimize their websites and content for mobile devices to provide a seamless reading experience.

    ReplyDelete