Example: Attribute dictionary attribute folder relationship
You 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. You 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.
CSV column and XML element definitions
- Identifier
- (String) The unique reference name for identifying the attribute.
Either this field or the
AttributeUniqueId
is required. - AttributeUniqueId
- (Integer) The unique reference number of the attribute. Either
this field or the
Identifier
is required. - FolderUniqueId
- (Integer) The unique ID of the folder. Either this field, the
FolderName
or theFolderPath
is required. - FolderName
- (String) The reference name for identifying the folder. The folder
name must be unique under a parent folder but different parent folders
can contain subfolders that have the same name. If the folder name
exists within multiple folders, specify the
FolderUniqueId
orFolderPath
for the folder. Either this field, theFolderUniqueId
orFolderPath
is required. - FolderPath
- (String) The unique file path location for identifying the folder.
Specify this path or the
FolderUniqueId
if theFolderName
cannot uniquely identify the folder. Either this field, theFolderUniqueId
orFolderName
is required. - Delete
- (String) A flag indicating whether to delete. Specify
1
to delete the row.
CSV file with sample attribute and folder relationship data
Insert
Delete
XML file with sample attribute and folder relationship data
Insert
Delete
Mapping data
<_config:DataMapping>
<!-- The attribute identifier -->
<_config:mapping xpath="AttributeIdentifier/ExternalIdentifier/Identifier" value="Identifier" />
<!-- The unique reference number of the attribute -->
<_config:mapping xpath="AttributeIdentifier/UniqueID" value="AttributeUniqueId" />
<_config:mapping xpath="FolderIdentifier/UniqueID" value="FolderUniqueId" />
<_config:mapping xpath="FolderIdentifier/Identifier" value="FolderName" />
<_config:mapping xpath="FolderIdentifier/Path" value="FolderPath" />
<!-- The Delete indicator -->
<_config:mapping xpath="" value="Delete" deleteValue="1" />
</_config:DataMapping>
If you perform an insert or
replace operation, do not specify the "Delete" column in the CSV file
or you 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 com.ibm.commerce.catalog.dataload.mediator.AttributeDictionaryAttributeFolderRelationshipMediator.