Example: Catalog entry and attribute dictionary attribute values (multiple attributes per CSV line)

Use the Data Load utility to insert, replace, and delete relationship between catalog entry and attribute dictionary attribute values simultaneously. This example differs from the previous one in that multiple attributes are specified per CSV line

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 attribute dictionary attribute and value data

To define your CSV file, use the format below. The first row of the table represents the column names, each subsequent row contains the corresponding column values. In this example, the CSV file contains attribute dictionary data.

PartNumber Color Size
Shirt-Red-Large Red Large
Shirt-Green-Small Green Small


Mapping data

The following code snippet from the catalog entry and attribute relationship load configuration file demonstrates how to map each value to a business object logical schema path. The attribute identifier, type, display sequence, and usage are hard-coded in the load configuration file. Hence it is only applicable to loading homogeneous catalog entries that share fixed set of attributes.


Business object mediator

The data load framework provides a business object mediator for inserting, replacing, and deleting relationship between catalog entries and attribute dictionary attributes. The mediator class name is CatalogEntryAttributeDictionaryAttributeExtendedMediator.

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.