Example: Category descriptions

We can insert, replace, or delete your category description in alternate languages data using the Data Load utility. Language sensitive fields can have multiple values that are loaded for each supported language. These examples use a CSV file to demonstrate how to insert, replace, or delete your category 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

Other optional fields not included in the example are:


CSV file with sample category description data


Insert or replace

The sample CSV file contains French language category descriptions. The categories already had English description loaded previously. CSV file with sample category description data

Formatted CSV file with column headings. Data is in French language
GroupIdentifier Name ShortDescription LongDescription Thumbnail FullImage Published Keyword
Appl_category catégorie d'appareils Description courte des appareils Description longue des appareils app_thumb/french_image.jpg app_full/french_image.jpg 1 mot-clé d'appareils
Fridge_category Réfrigérateurs Description courte de réfrigérateur Description longue de réfrigérateur fridge_thumb/french_image.jpg fridge_full/french_image.jpg 1 mot-clé de réfrigérateur


Delete

The sample CSV file contains French language category description data that to delete from a WebSphere Commerce database. CSV file with sample category description data

Formatted CSV file with column headings
GroupIdentifier Name ShortDescription LongDescription Thumbnail FullImage Published Keyword Delete
Appl_category catégorie d'appareils Description courte des appareils Description longue des appareils app_thumb/french_image.jpg app_full/french_image.jpg 1 mot-clé d'appareils 1
Fridge_category Réfrigérateurs Description courte de réfrigérateur Description longue de réfrigérateur fridge_thumb/french_image.jpg fridge_full/french_image.jpg 1 mot-clé de réfrigérateur 1


Mapping data

The following snippet from the sample catalog group 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 CatalogGroupDescriptionMediator.

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.