Administer > Transforming, loading, and extracting data > Overview of the mass load utilities > Resolve identifiers


Resolve identifiers for records that share identifiers with existing data

If you are loading new data into a WebSphere Commerce database that shares identifiers with data that already exists in the WebSphere Commerce database, include the existing data in the XML file that to load. The existing data must appear before the new data in the XML file.

An example of this situation is adding a new language to an existing catalog. For example, you have a master catalog in English and to add French information to the catalog.

The idresgen utility generates new identifiers for the new data instead of referencing the existing data for either of the following situations:

By including the existing data before the new data, the idresgen utility is correctly able to resolve the identifiers and relate them to existing identifiers.


Example

A master catalog has English data loaded into the database. The English catalog has a shirt with two attributes, color and size. The ATTRIBUTE database table contains the following information:

ATTRIBUTE_ID LANGUAGE_ID ATTRTYPE_ID NAME DESCRIPTION
12090 -1 STRING Color Color
12124 -1 STRING Size Size

To add French data, an XML file with the following contents was created:

<attribute attribute_id="@attribute_id_Size_203010063" name="Size" attrtype_id="STRING" description="Taille" catentry_id="@203010063@-2003" language_id="-2"/>

<attribute attribute_id="@attribute_id_Color_203010063" name="Color" attrtype_id="STRING" description="Couleur" catentry_id="@203010063@-2003" language_id="-2"/>

After running the idresgen and massload utilities on the XML file, the ATTRIBUTE database table contains the following information:

ATTRIBUTE_ID LANGUAGE_ID ATTRTYPE_ID NAME DESCRIPTION
12090 -1 STRING Color Color
12124 -1 STRING Size Size
14151 -2 STRING Color Couleur
14443 -2 STRING Size Taille

This result is incorrect. The attributes with the same NAME value should also have the same ATTRIBUTE_ID values.

To have the English data and the French data have the correct ATTRIBUTE ID values, the XML file has the following content:

<attribute attribute_id="@attribute_id_Size_203010063" name="Size" attrtype_id="STRING" description="Size" catentry_id="@203010063@-2003" language_id="-1"/>

<attribute attribute_id="@attribute_id_Color_203010063" name="Color" attrtype_id="STRING" description="Color" catentry_id="@203010063@-2003" language_id="-1"/>

<attribute attribute_id="@attribute_id_Size_203010063" name="Size" attrtype_id="STRING" description="Taille" catentry_id="@203010063@-2003" language_id="-2"/>

<attribute attribute_id="@attribute_id_Color_203010063" name="Color" attrtype_id="STRING" description="Couleur" catentry_id="@203010063@-2003" language_id="-2"/>

After running the idresgen and massload utilities on this XML file, the ATTRIBUTE database table contains the following information:

ATTRIBUTE_ID LANGUAGE_ID ATTRTYPE_ID NAME DESCRIPTION
12090 -1 STRING Color Color
12090 -2 STRING Color Couleur
12124 -1 STRING Size Size
12124 -2 STRING Size Taille


Related concepts

Overview of the mass load utilities

Overview of loading store data


Related tasks

Load data using the mass load utility

Related reference

idresgen utility

massload utility (Server environment)


+

Search Tips   |   Advanced Search