Samples >
Data load utility samples
The samples provided with the data load utility demonstrate best-practice methods for loading data using common loading scenarios. Use the samples as a template for loading the own data to the store.
Data load samples description
Each sample includes source data in comma-separated values (CSV) format and the required data load configuration files. You can run the samples as is, or you can edit the CSV files and configuration files to load the own data. The samples appear in the following directories when WebSphere Commerce is installed:
- WC_INSTALL/samples/DataLoad
- WC_INSTALL\samples\DataLoad
- WCDE_INSTALL\samples\DataLoad
All the CSV sample files in the preceding directory are specific to the Data Load utility.
The DataLoad directory contains three subdirectories named Catalog, Inventory, and Price. The samples in the Catalog directory contain catalog, inventory, and price data to provide an integrated loading scenario. The following diagram shows the structure of the master catalog and sales catalog in the store after the samples in the Catalog directory are run:
By default, the Madisons starter store is used in all samples, except for the extended sites sample. The extended sites sample uses the Sample B2B Store and Extended Sites Catalog Asset Store. If an existing store is used, the data loaded in the samples are added to any existing data for that store. Change the default store by editing the environment configuration file.
Prerequisites for running the samples
The following prerequisites are required for running the data load utility samples:
- The store you are using must be published.
- The inventory type for the samples in the Catalog directory must be non-ATP.
- To run the extended sites sample, use the extended sites business model.
- Stop the WebSphere Commerce Server. See Start and stop the WebSphere Commerce Test Server via command line for more information about stopping the WebSphere Commerce Server.
Run SQL statements in the samples
Each of the samples contain SQL statements for verifying data and for cleaning up the data.To run the SQL statements, use the following steps:
- Open the DB2 Command Center.
- Type the SQL statement in the script window.
- Open the Oracle SQL Plus command window.
- Type the SQL statement in the SQL Plus window.
- Start WebSphere Commerce Test Server
- Open a browser and type the following URL:
http://localhost/webapp/wcs/admin/servlet/db.jsp
- Type the SQL statement in the input box.
Data load utility samples
- Sample: Setting up the data load utility
Before running the data load utility for the first time, configure the store and database environment settings.
- Sample: Loading initial data
This sample demonstrates how to simultaneously load top categories, subcategories, products, SKUs, attributes, and prices. This data is typically the first data to be loaded to the store.
- Sample: Updating SKU inventory
This sample demonstrates how to update inventory quantities for the SKUs that have already been loaded to your database.
- Sample: Loading merchandising associations
This sample demonstrates how to load merchandising associations for SKUs that have already been loaded to the database.
- Sample: Replacing existing products and SKUs
This sample demonstrates how to use the data load replace mode by replacing products and SKUs previously loaded to the database.
- Sample: Loading bundles and kits
This sample demonstrates how to load bundles and kits to the database.
- Sample: Loading classic attributes, attribute values, and allowed values
This sample demonstrates how to load classic attributes together with the associated allowed values and attribute values in a single load operation.
- Sample: Changing the parent of a subcategory
This sample demonstrates how to use the CatalogGroupRelationshipMediator data load mediator to move a subcategory from one parent to another.
- Sample: Loading category descriptions in multiple languages
This sample demonstrates how to load English and French category descriptions in a single step operation, as well as a multiple step operation.
- Sample: Adding image attachments to categories and catalog entries
This sample demonstrates how to associate attachments with categories and catalog entries.
- Sample: Loading sales catalogs
This sample demonstrates how to load a sales catalog and sales categories using the data load utility.
- Sample: Loading data to an extended sites store and catalog asset store
This sample demonstrates how to load data to the extended sites store and catalog asset store when using the extended sites business model.
- Sample: Loading list prices in multiple currencies
This sample demonstrates how to load list prices in multiple national currencies simultaneously. You can load different national currencies to the store by modifying the source file in the sample. All currency codes are based on the ISO 4217 standard.
- Inventory samples
The following samples demonstrates how to load inventory data using the data load utility.
- Examples: Mapping data
The data load utility uses three configuration files when loading data: wc-dataload.xml, wc-dataload-env.xml, and wc-<BO loader>.xml. The wc-dataload.xml file defines the order in which the data is loaded. The wc-dataload-env.xml file specifies the environment information such as database type, context settings, and global properties. The wc-<BO loader>.xml file describes the business objects being loaded into the database; the file is specific for each business object. The following examples show you how to map catalog, price, and inventory data in a CSV data source file.
Related concepts
Data load framework process and components