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
- Open a the Utility server Docker container..
- Open the Data Load environment wc-dataload-env.xml configuration file in
the appropriate directory:
utilities_root/samples/DataLoad/Catalog
- 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> - Encrypt the password of the database user:
- Enter the following command:
./wcs_encrypt.sh
db_password
- Use the encrypted password next to ASCII encrypted
string as the value for the
passwordattribute inside the<_config:Database>element.
Note: For security, the password should be encrypted when specified inside of the configuration file. - Enter the following command:
- Change the attribute values inside the
<_config:Database>element to match your database environment.
Where:<_config:Database type="db2" name="name" user="user" password="password" server="server" port="port" schema="schema" />- type
- db2, oracle or postgres.
- 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. By default, the utility configuration applies the Secure Sockets Layer (SSL) enabled database port. If the database operates on a non-SSL port, specify that non-SSL port value.
- 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:
Where storeIdentifier is the external identifier for your store, for example Aurora.UPDATE STORE SET INVENTORYSYSTEM=-1 WHERE STORE_ID in (SELECT STOREENT.STOREENT_ID FROM STOREENT WHERE STOREENT.IDENTIFIER ='storeIdentifier')