Sample: Setting up the Data Load utility
Before running the Data Load utility for the first time, 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
- Open a the Utility server Docker container..
- Open the Data Load environment wc-dataload-env.xml configuration file in the appropriate directory:
- (Linux) utilities_root/samples/DataLoad/Catalog
(Developer) WCDE_installdir\samples\DataLoad\Catalog
- Change the values of the business context attributes inside the <_config:BusinessContext> element to match the 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>
- (DB2) (Oracle) Encrypt the password of the database user:
- Open the command-line interface and go to the following directory:
- (Linux) utilities_root/bin
(Developer) WCDE_installdir\bin
- Enter the following command:
- (Linux) ./wcs_encrypt.sh db_password
(Developer) wcs_encrypt.bat db_password
Where db_password is the password for the database user.
- 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.
- Change the attribute values inside the <_config:Database> element to match the 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, we 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.
- Save and close the configuration file.
- 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 the store, for example Aurora.