Sample: Loading point of interest (POI) data
This sample demonstrates how to load points of interest into the database with the Data Load utility.
About this sample
This sample loads point of interest locations into the POINTOFINTEREST table and point of interest descriptions into the POIDESC table.
Procedure
- The sample data for point of interest locations uses a default STORE_ID value of 10202. If store
publish uses a different Store ID value, update the values in the STORE_ID column of the CSV
file.Open the point of interest CSV file from the following location:
utilities_root/samples/DataLoad- WCDE_installdir\samples\DataLoad
- Replace the values in the STORE_ID column with the value of your store ID.
- Update the following file with your database-specific information such
as the store identifier, database type, name, user, password, port number, and
schema name:Note: If your site uses the extended site store model, load data against the individual extended site stores instead of the asset store. Store locations can vary among the individual extended site stores. Use the individual extended site identifier for the
storeIdentifierproperty in the wc-dataload-env.xml file, rather than the asset store identifier.
utilities_root/samples/DataLoad/Location/wc-dataload-env.xml- WCDE_installdir\samples\DataLoad\Location\wc-dataload-env.xml
Use the wcs_encrypt command to generate an encrypted string of your password. Record the ASCII encrypted string. For example:
<_config:BusinessContext storeIdentifier="Madisons" languageId="-1" currency="USD"> </_config:BusinessContext> <!-- database setting for derby in Toolkit --> <_config:Database type="derby" name="..\db\mall" schema="APP"/> <!-- database setting for Oracle --> <!-- <_config:Database name="<database name>" user="<user>" password="<password>" port="1521" schema="<schema name>" server="<server>" type="Oracle" /> --> <!-- database setting for DB2 server --> <!-- <_config:Database type="db2" name="<database name>" user="<user>" password="<password>" server="<server>" port="<port>" schema="<schema>" /> --> - Save your changes and close the file.
- On a command line, go to the /opt/CommerceUtilities/samples/bin directory.
Open a command line in the .
Change the directory to
utilities_root/bin directory.
For information about entering and leaving containers, see
Running utilities from the Utility server Docker container.- Enter the following command:
./dataload.sh
../samples/DataLoad/Location/PointOfInterest/wc-dataload.xml- dataload.bat ..\samples\DataLoad\Location\PointOfInterest\wc-dataload.xml
- Refresh the Point of Interest registry.
Verifying the results
The wc-dataload.xml configuration file calls the wc-loader-pointofinterest.xml configuration file to load the point of interest location data from the PointOfInterest.csv source file.
The wc-dataload.xml file then calls the wc-loader-poidesc.xml configuration file to load the points of interest description data from the POIDesc.csv.
To verify that the point of
interest location data was loaded into the database, run the following SQL
command:
select * from pointofinterest
To verify that the
point of interest description data was loaded into the database, run the following SQL
command:
select * from poidesc
After verifying the results,
you can test the store check-in functionality in the Commerce Lab and in the mobile
storefront.