Sample: Loading roles to organizations
This sample shows you how to assign roles to organizations and then load this data into the database.
About this sample
This sample assigns the Category Manager role to the sample organization.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.- Enter the following command to load the Category Manager role data into the database:
- (Linux) ./dataload.sh ../samples/DataLoad/Member/Organization/wc-dataload.xml –DLoadOrder="Organization,OrganizationRole"
(Developer) dataload ..\samples\DataLoad\Member\Organization\wc-dataload.xml –DLoadOrder="Organization,OrganizationRole"
Verifying results
To verify that the role assigned to the sample organization was loaded into the database, run the following SQL command:SELECT * FROM MBRROLE WHERE MEMBER_ID IN (SELECT ORGENTITY_ID FROM ORGENTITY WHERE ORGENTITYNAME IN ('Sample Organization','HR Department','Retail Department'))
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/Organization directory.