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
storeIdentifier
property 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:
- Save your changes and close the file.
- On a command line, go to the WCDE_installdir\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.
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 Management Center and in the mobile
storefront.Removing the sample data from the HCL Commerce database
To remove the sample data from your database, run the sample again but with the
value for the delete column for all entries within the files set to 1
. By setting
the value for this column to 1
, the Data Load utility deletes the data that is
identified in the CSV file from your database.