Sample: Loading updates for catalog entry properties and descriptions

This sample demonstrates how to use the Data Load utility update mode to update catalog entry property and description information. In this sample, the names for existing products and SKUs are changed.

Before beginning

Ensure that you load the data that is in the following sample:

When you load the following sample, the Data Load utility updates the name of products and SKUs that were loaded in the initial catalog data sample.


About this sample

The CatalogEntriesUpdate.csv file in this sample updates only the product and SKU names. We can include more information in the CatalogEntriesUpdate.csv file to update other catalog entry property and description information. Any field that is left without a value is unchanged by the Data Load utility when the utility runs in update mode for loading catalog entry data. For more information about the information that we can include in this file, see CatalogEntry. This sample loads the following catalog entry data:

Part Number Name loaded within initial catalog data sample Updated name loaded within this sample
Cords Men's corduroy pants Men's designer corduroy pants
Cords-Black-29W x 28L Men's corduroy pants - Black 29W x 28L Men's designer corduroy pants - Black 29W x 28L

We can load data for updating catalog entry data in CSV or XML formatted input files. The following procedure loads only CSV input files. The sample CSV input file, load order configuration file, and business object configuration file for this sample are in the following folder

The wc-dataload-env.xml file is in the Catalog folder, which contains the CatalogEntryUpdate folder. The sample folder includes the following files:


Procedure

  1. (Developer) On a command line, go to the WCDE_installdir\bin directory.

  2. (Linux) Open a command line in the Utility server Docker container. Change the directory to utilities_root/bin directory.
    For information about entering and leaving containers, see Running utilities from the Utility server Docker container.

  3. Enter the following command to run the sample data load order file and load the information that included in this sample:

    • (Linux) ./dataload.sh ../samples/DataLoad/Catalog/CatalogEntryUpdate/wc-dataload-catalog-entry-update.xml

    • (Developer) dataload ..\samples\DataLoad\Catalog\CatalogEntryUpdate\wc-dataload-catalog-entry-update.xml

The Data Load utility uses the wc-loader-catalog-entry-update.xml configuration file to update the product and SKU data that is in the database with the data that is in the CatalogEntriesUpdate.csv source file.


Verifying results


Removing the sample data from the WebSphere Commerce database

To remove the sample data that you loaded in this sample from the database, run the CleanUp.sql file that is in the following folder:

From a command prompt, connect to the database with your user ID and password. Run the following command. (DB2)

(Oracle)