Samples > Data load utility samples
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 sets the following default values in the environment configuration file:
- Store - Madisons starter store
- Language - English (-1)
- Currency - United States dollar (USD)
- Database type - Derby
- Inventory type - non-ATP or ATP
Change any of these values (except inventory type) as needed to match the values of the existing environment and store.
Next topic: Sample: Loading initial data
Define the environment settings
Procedure
- Open the wc-dataload-env.xml configuration file in the appropriate directory:
- WC_INSTALL/samples/DataLoad/Catalog
- WCDE_INSTALL\samples\DataLoad\Catalog
- Optional: Change the values of the attributes inside the <_config:BusinessContext > element to match the store settings.
<_config:BusinessContext storeIdentifier="Madisons" catalogIdentifier="Madisons" languageId="-1" currency="USD"> </_config:BusinessContext>
- Encrypt the password of the database user:
- Open the command-line interface and navigate to the appropriate directory:
- WC_INSTALL/bin
- WCDE_INSTALL\bin
- Enter the following command:
- ./wcs_encrypt.sh db_password
- wcs_encrypt 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.
For security, the password should always be encrypted when specified inside of the configuration file.
- Optional: Change the attribute values inside the <_config:Database> element to match the database environment.
- <_config:Database type="derby" name="..\..\db\mall" />
- <_config:Database type="db2" name="database name" user="user" password="encrypted password" server="server" port="50000" schema="schema name" />
- <_config:Database type="Oracle" name="database name" user="user" password="encrypted password" port="1521" schema="schema name" server="server" driverType="thin" />
Where:
- type
- derby
- db2
- oracle
- name
- The name of the database
- user
- The database user ID.
- password
- The database password needed to connect to the database. For security purposes, the password is always encrypted. If the password field is empty, we will be prompted to enter the password on the command line when you run the data load 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.
- driverType
- The database driver type. It is optional. The default value for the driverType is thin. Another possible option for the driverType is oci8 which is the oracle thick driver.
- schema
- The name of the database schema.
- Save and close the configuration file.
- Optional: To set the inventory system to non-ATP, run the following SQL statement:
UPDATE STORE SET INVENTORYSYSTEM=-2 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 Madisons.
By default, the Madisons store uses ATP inventory type. If an ATP store is desired, omit this step.
Related reference
Related information
Data load environment configuration file