
Sample: Loading promotions data
About this sample
WC_installdir/components/foundation/samples/DataLoad/Promotion
WC_installdir\components\foundation\samples\DataLoad\Promotion
WCDE_installdir\components\foundation\samples\DataLoad\Promotion
Sample input and configuration files
Sample XML input file | Description |
---|---|
Promotion.xml For more information about the type of promotion data that you can include in an input file, see Promotions XML input file |
The Data Load utility uses this sample input
file to load the data to create promotions in the Promotions tool. The Data Load utility uses the following business object mediator to load the data in this input file into the PX_PROMOTION database table. Business object mediator com.ibm.commerce.promotion.dataload.mediator.PromotionDOMMediator |
- wc-dataload.xml
- The data load order configuration file, which identifies the XML input file and the appropriate business object configuration file to use to load each input file. For more information about load order configuration files, see Configuring the data load order.
- wc-dataload-env.xml
- The data load environment configuration file, which includes the
environment variables for your WebSphere Commerce instance.
These variables include the following information:
- Business context variables, including the store identifier, catalog identifier, and the default language and currency for your store.
- Database environment settings, including the database type, name, and schema.
- wc-loader-promotion.xml
- The business object configuration file that defines how the promotion data is loaded into the database. The file also defines the appropriate business object mediator to use to load the data.
Procedure
- Open a command line utility and go to the appropriate directory:
WC_installdir/bin
WC_installdir\bin
WCDE_installdir\bin
- Enter the following command to run the sample data load order
file and load the information that included in this sample:
./dataload.sh ../components/foundation/samples/DataLoad/Promotion/wc-dataload.xml
dataload.bat ..\components\foundation\samples\DataLoad\Promotion\wc-dataload.xml
dataload ..\components\foundation\samples\DataLoad\Promotion\wc-dataload.xml
Verifying results
To verify that the promotion data is loaded, complete the following tasks:- Review the data load summary report. For more information about the location and contents of this summary report, see Verifying the results of the data load.
- Review the data in your database and verify that the data in your input file exists in your database.
- In Management Center, verify that you can view the promotions in the Promotions tool.
Removing the sample data from the WebSphere Commerce database
Edit the wc-dataload.xml load
order configuration file to change the value of the dataLoadMode
attribute
from "Replace"
to "Delete"
to run
the Data Load utility in delete mode. When you run the utility in
delete mode, the utility deletes the data in your database that matches
the rows in your XML file. You do not need to edit the value for Delete
column in your input XML file.
Compare the data in your database with your input file to verify that the data no longer exists in your database.
In Management Center, verify that you can no longer view the promotions in the Promotions tool.