Samples > Data load utility samples


Sample: Loading attribute dictionary data

This sample demonstrates how to load attributes, attribute values, and allowed values to the attribute dictionary. If you are using the attribute dictionary, use this sample. If you are using classic attributes, use the sample Load classic attributes, attribute values, and allowed values.


About this sample

Attribute dictionary data loaded in this sample.
Attribute Identifier Attribute type Attribute Value 1 Attribute Value 2 Attribute Value 3 Attribute Value 4
CordsColor Define attribute Black Brown    
CordsSize Define attribute 29W x 28L 30W x 32L 34Wx30L  
DressPantColor Define attribute Black Blue    
DressPantSize Define attribute 29W x 32L 32W x 32L    
DressShirtColor Define attribute White      
DressShirtSize Define attribute 15 16 17  
CasualShirtColor Define attribute White Blue Pink Purple
CasualShirtSize Define attribute Small Medium Large  
BodysuitColor Define attribute Black      
BodysuitSize Define attribute Petit      
Style Descriptive attribute        


Procedure

Complete the following steps to ensure that the associated products and SKUs have been loaded to the database before loading the attributes, attribute values, and allowed values:

  1. Open the command-line interface and navigate to the appropriate directory:

  2. Enter the following command:

    For a non-ATP store:

    • ./dataload.sh ../samples/DataLoad/Catalog/wc-dataload-catalog-entry.xml

    • dataload ..\samples\DataLoad\Catalog\wc-dataload-catalog-entry.xml

    For an ATP store:

    • ./dataload.sh ../samples/DataLoad/Catalog/wc-dataload-ATP-catalog-entry.xml

    • dataload ..\samples\DataLoad\Catalog\wc-dataload-ATP-catalog-entry.xml

  3. Once the product and SKU data have been loaded, enter the following command to load attribute data to the attribute dictionary:

    • ./dataload.sh ../samples/DataLoad/Catalog/AttributeDictionaryAttribute/wc-dataload.xml

    • dataload ..\samples\DataLoad\Catalog\AttributeDictionaryAttribute\wc-dataload.xml

  4. (Optional) Load attributes and allowed values in other national languages. For example, to load attributes and allowed values in French, enter the following command:

    • ./dataload.sh ../samples/DataLoad/Catalog/AttributeDictionaryAttribute/wc-dataload-attribute-multi-langs.xml

    • dataload ..\samples\DataLoad\Catalog\AttributeDictionaryAttribute\wc-dataload-attribute-multi-langs.xml


Verify results

The wc-dataload.xml configuration file calls the wc-loader-AD-attribute-and-allowed-value.xml file to load attribute data from the AttributeDictionaryAttributeAndAllowedValue.csv source file. This file is used to create the attributes and the range of allowed values in the attribute dictionary. The wc-dataload.xml file then calls the wc-loader-AD-attribute-value.xml configuration file to load the specific attribute values for each SKU from the AttributeDictionaryAttributeValue.csv source file.

Verify that the data has been loaded by running the following SQL statements:


Clean up the data

To remove the data loaded in this sample from the database, run CleanUp.sql file located in the /samples/DataLoad/Catalog/AttributeDictionaryAttribute directory.


Related concepts

Attribute dictionary

Related reference

Data load utility samples


+

Search Tips   |   Advanced Search