Sample: Loading address books
This sample shows you how to load user addresses into the database.
About this sample
This sample loads addresses for the following users:
- Ryan Johnson
- Olivia Lee
If you prefer to work with data in XML format instead of in CSV format, we can configure the utility to use XML formatted files. Edit the wc-dataload.XML file and change the location elements to reference the XML files provided.
Procedure
(Developer) On a command line, go to the WCDE_installdir\bin directory.
- (Linux) Open a command line in the Utility server Docker container. Change the directory to utilities_root/bin directory.
For information about entering and leaving containers, see Running utilities from the Utility server Docker container.- (Linux) Open a command line in the Utility server Docker container. 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:
- (Linux) ./dataload.sh ../samples/DataLoad/Member/Person/wc-dataload.xml –DLoadOrder=PersonAddressBook
(Developer) dataload ..\samples\DataLoad\Member\Person\wc-dataload.xml –DLoadOrder=PersonAddressBook
Verifying results
To verify that the address information for the users was loaded into the database, run the following SQL command:select nickname,address1,city,state from address where nickname in('ryanjohnson2','olivialee','sophiawilliams') and selfaddress=0
Cleaning up the data
To remove the data loaded in this sample from the database, run the CleanUp.sql file in the /samples/DataLoad/Member/Person directory.