Sample: Setting up the Data Load utility

Before you run the Data Load utility for the first time, you must configure the store and database environment settings.

About this sample

This sample works with the following values in the environment configuration file:
  • Store
  • Language
  • Currency
  • Database type
  • Inventory type

Defining the environment settings

  1. Open a the Utility server Docker container..
  2. Open the Data Load environment wc-dataload-env.xml configuration file in the appropriate directory:
    • Linuxutilities_root/samples/DataLoad/Catalog
    • HCL Commerce DeveloperWCDE_installdir\samples\DataLoad\Catalog
  3. Change the values of the business context attributes inside the <_config:BusinessContext> element to match your store settings:
    For example:
    
    <_config:DataLoadEnvConfiguration
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xsi:schemaLocation="http://www.ibm.com/xmlns/prod/commerce/foundation/config 
                               ../../../xml/config/xsd/wc-dataload-env.xsd" 
    	xmlns:_config="http://www.ibm.com/xmlns/prod/commerce/foundation/config">
    	<_config:BusinessContext storeIdentifier="Aurora" catalogIdentifier="Aurora" 
    		languageId="-1" currency="USD">
    
    </_config:BusinessContext>
  4. 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./wcs_encrypt.sh 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.
    Note: For security, the password should be encrypted when specified inside of the configuration file.
  5. 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" />
    
    Where:
    type
    db2 or oracle
    name
    The name of the database
    user
    The database user ID.
    password
    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.
    server
    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.
    port
    The port to connect to the database.
    schema
    The name of the database schema.
  6. Save and close the configuration file.
  7. The Aurora starter store uses the non-ATP inventory system by default. If you instead want to use the ATP inventory system, run the following SQL statement:
    UPDATE STORE SET INVENTORYSYSTEM=-1 WHERE STORE_ID in (SELECT STOREENT.STOREENT_ID FROM STOREENT 
    WHERE STOREENT.IDENTIFIER ='storeIdentifier')
    Where storeIdentifier is the external identifier for your store, for example Aurora.