Configuring the data load environment settings

Configure the environment variables that are used by the Data Load utility in an XML file called wc-dataload-env.xml.


  1. Create a file that is called wc-dataload-env.xml. You can create this file within any directory. Ensure that any other Data Load utility configuration file that must reference this file includes the path to your new file.
    Sample environment configuration files are provided for different component objects within the component-specific directories within the following directory:
    • Linuxutilities_root/samples/DataLoad
    • HCL Commerce DeveloperWCDE_installdir\samples\DataLoad
  2. Change the values of the business context attributes inside the <_config:BusinessContext> element to match your store settings:
    The identifying name of the store that owns the object data, for example, Aurora.
    The language ID for the language of the data, for example, -1 for English.
    If you are configuring the utility to load catalog data, configure the following settings:
    The catalog that includes the catalog entry or category data, for example, Aurora.
    The currency code for the price data, for example, USD.
    For example:
    	<_config:BusinessContext storeIdentifier="Aurora" catalogIdentifier="Aurora" 
    		languageId="-1" currency="USD">
  3. Required: Change the attribute values inside the <_config:Database> element to match your database environment.
    <_config:Database type="db2" name="name" user="user" password="password" 
    server="server" port="port" schema="schema" />
    db2 or oracle
    The name of the database
    The database user ID.
    The database password is necessary to connect to the database. For security purposes, the password is always encrypted. If the password field is empty, you are prompted to enter the password on the command line when you run the utility.
    The name of the server the database is on. The server name can be the IP address or the fully qualified DNS name of the server the database is on.
    The port to connect to the database.
    The name of the database schema.
  4. Required: Encrypt the password of the database user:
    1. Open the command-line interface and go to the following directory:
      • Linuxutilities_root/bin
      • HCL Commerce DeveloperWCDE_installdir\bin
    2. Enter the following command:
      • Linux./ db_password
      • HCL Commerce Developerwcs_encrypt.bat db_password
      Where db_password is the password for the database user.
    3. Use the encrypted password next to ASCII encrypted string as the value for the password attribute inside the <_config:Database> element.
  5. Find the <_config:IDResolver> element.
  6. Optional: Modify the cache size inside the tag. The cache size that you specify here does not apply to a specific database table, but is instead divided between all database tables that are participating in a data load.
    This attribute sets the cache memory allocation for the ID resolver. The ID resolver performs faster when unique ID data in retrieved from cache memory instead of from the database.
    Note: If you do not specify a <_config:IDResolver> element, the default cache size value is 0 bytes.
  7. Optional: Identify any database tables that are to be excluded from having IDs from those tables included within the IDresolver cache. When a table is excluded from this cache, the Data Load utility resolves the ID for business objects information directly against the database table.
    Note: For Non-ATP inventory model.

    If you plan to perform multiple inventory updates that include a delete and a reinsert for the same catalog entry, then you need to exclude the INVENTORY database table. Otherwise the catalog entry is not reinserted after a delete due to a IDresolver cache limitation.

    To exclude a table from the ID resolver cache, use the <_config:ExcludeCache> element within the <_config:IDResolver> element. Specify the table with the tableName attribute. Specify each table that is to be excluded in a separate <_config:ExcludeCache> element. For example,
    <_config:IDResolver className="
    IDResolverImpl" cacheSize="2000" >
      <_config:ExcludeCache tableName="BASEITEM" />
      <_config:ExcludeCache tableName="CATENTRY" />
      <_config:ExcludeCache tableName="INVENTORY" />
  8. Optional: Set the data writer class. Find the <_config:DataWriter> element. Add the class name of the data writer inside the tag.

    native load data writer

    Writes HCL Commerce physical objects to database loadable files. The files are specific to the selected database management system. These files must be written to the database with the native database loading utilities in a separate operation.
    • DB2The native data writer supports both insert mode and replace mode. In insert mode, it uses the DB2 load utility to load the native loadable files. In replace mode, it uses the DB2 import utility to load the native loadable file.
    • OracleThe native data writer supports only the insert mode. In insert mode, it uses the Oracle sqlldr utility to load these native loadable files.
    Insert mode should not be used in the staging environment because the native database utilities bypass the triggers. For DB2 replace mode, it uses the DB2 import utility that can be used in the staging environment.

    Use the native load data writer for faster performance than JDBC batch jobs, such as when a large amount of data is being loaded during initial loads.

    <_config:DataWriter className="" />

    JDBC data writer

    Writes physical objects directly to a database in a JDBC batch job. The JDBC data writer has the following advantages over the native load data writer:
    • The JDBC data writer supports insert, delete, and replace modes. The native load data writer supports only the insert mode.
    • The native load data writer bypasses database triggers, requiring data to be loaded separately to both production and staging environments. The JDBC data writer does not bypass database triggers.
    • The JDBC data writer provides more error reporting than the native load data writer.

    Use the JDBC data writer for greater flexibility, such as when you replace and delete data during the same load.

    <_config:DataWriter className="" />
    Note: If you do not specify a <_config:DataWriter> element, the JDBC data writer is used by default.
  9. Save and close the configuration file.