Mass extract (massextract) is an OOB utility which can be used to extract data from any tables in IBM WCS. Use the massextract utility to extract selective subsets of data from the WebSphere Commerce database in the form of XML files.
You can extract data on products related to an upcoming holiday, for example, or you can extract information from a consolidated database for use with other systems.
You can extract data on products related to an upcoming holiday, for example, or you can extract information from a consolidated database for use with other systems.
Step-1
Pre-Request for before running this utility
i. Assume that environment variable setting done.
ii. JVM Setting (optional)
iii. (Oracle) Optional: By default, the massextract utility uses the Oracle thick JDBC client. To change the massextract utility to use the Oracle thin JDBC client.
Step-2
Create an extraction filter: An extraction filter is an XML file that defines the data want to extract from the WebSphere Commerce database. Must create an extraction filter before run the massextract utility.
Procedure to extraction filter
1. Develop SQL queries for the data you want to extract from the WebSphere
Commerce database.
Extraction filter format
This tag and its closing tag define the extraction filter. All of the text in the extraction
file must be contained within this tag.
file must be contained within this tag.
This tag defines the SQL query used to extract data from the database.
Every tag requires one or more tags.
Every
This tag is responsible for the running of the SQL query. In this tag, you can also
specify for any values required for variable parameter defined in the tag.
Multiple tags can be associated with one tag.
specify for any values required for variable parameter defined in the
Multiple
Example:
1. Create file called CatentryFilter.xml
2. Add the following content to CatentryFilter.xml
3. Finally execute the below extract utility
./massextract.sh -filter /opt/IBM/WebSphere/CommerceServer60/bin/CatentryFilter.xml -outfile /opt/IBM/WebSphere/CommerceServer60/bin/CatentryFilterExtracted.xml -dbname PPSTGDB -dbuser MIPRODSTA -dbpwd MIPRODSTA -customizer OracleConnectionCustomizer
Note: we can query multiple tables using join conditions.
No comments:
Post a Comment