Example: Attribute dictionary attribute folder relationship

We can use the Data Load utility to insert or delete the relationships between attribute dictionary attributes and attribute folders. These examples use a CSV file to demonstrate how to insert or delete multiple attribute and folder relationships simultaneously.

This example uses a CSV file to demonstrate how to insert or delete your data. We can also create and use an XML formatted file to insert 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.

Note: Before you load your attribute and folder relationship information, both the attribute and the folder must exist in your system.


CSV column and XML element definitions


CSV file with sample attribute and folder relationship data

Insert In this example, the CSV file sample contains attribute dictionary attribute and attribute folder data.

Delete In this example, the CSV file contains sample attribute and folder relationship data to delete.


XML file with sample attribute and folder relationship data

Insert In this example, the XML file sample contains attribute dictionary attribute and attribute folder data.

Delete In this example, the XML file contains sample attribute and folder relationship data to delete.


Mapping data

The following code snippet from the attribute and folder loader (wc-loader-AD-attribute-folder-relationship.xml) 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 data load framework provides a business object mediator for inserting and replacing attribute and folder relationships. The mediator class name is AttributeDictionaryAttributeFolderRelationshipMediator.

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.