Example: Catalog entry descriptions

We can use the Data Load utility to replace, or delete catalog entry descriptions. These examples use a CSV file to demonstrate how to replace, or delete multiple catalog entry descriptions.

This example uses a CSV file to demonstrate how to insert, replace, or delete your data. We can also create and use an XML formatted file to insert, replace, or delete your data. If you choose to create and use an XML formatted file, ensure that your XML elements use the same names as are used for CSV column names.


CSV column and XML element definitions


CSV file with sample catalog entry description data

Replace

In this example, the data source is a CSV file. The file contains sample catalog entry descriptions. CSV file with sample catalog entry description data.

Formatted CSV file with column headings
PartNumber Language_ID Name ShortDescription LongDescription
Example-PN-10001 -1 200-watt microwave 200-watt microwave short description 200-watt microwave long description
Example-PN-10002 -1 150-watt microwave 150-watt microwave short description 150-watt microwave long description

Formatted CSV file with column headings - continued
Thumbnail FullImage AuxDescription1 AuxDescription2
200_microw_thumb/image.jpg 200_microw_full/image.jpg 200-watt microwave auxiliary description 1 200-watt microwave auxiliary description 2
150_microw_thumb/image.jpg 150_microw_full/image.jpg 150-watt microwave auxiliary description 1150-watt microwave auxiliary description 2 200-watt microwave

Formatted CSV file with column headings - continued
Available Published AvailabilityDate Keyword
1 1 20/4/2008 200-watt microwave keyword
0 1 20/4/2008 150-watt microwave keyword

Delete

In this example, the CSV file contains sample catalog entry descriptions only the required fields are shown in the sample. CSV file with sample catalog entry description data.

Formatted CSV file with column headings
PartNumber Language_ID Delete
Example-PN-10001 -1 1
Example-PN-10002 -1 1


Mapping data

The following code snippet from the catalog entry description loader configuration file demonstrates how to map each value to a business object logical schema path.

If you perform an insert or replace operation, do not specify the "Delete" column in the CSV file or we can leave the "Delete" column empty.


Business object mediator

The mediator class name is CatalogEntryDescriptionMediator.

Note: When we use a mediator that is provided with WebSphere Commerce with the Data Load utility, the utility assumes that we are loading data for all columns for a business object. To update the data in only specific columns, configure a column exclusion list for the load process. A column exclusion list causes the Data Load utility to ignore specific columns during the load operation. If you do not use a column exclusion list, the utility updates all columns in the row of a database table row when the utility updates the row. If no value is set in the input file, the utility can replace the existing column value with a default value or set the value to be null. See Configure a column exclusion list.