Sample: Loading bundles and kits

This sample demonstrates how to load bundles and kits to the database.


About this sample

This sample loads the following catalog entries:


Procedure

Before running this sample, ensure that you have loaded the initial data.

  1. (Developer) On a command line, go to the WCDE_installdir\bin directory.

  2. (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.

  3. Enter the following command:

    • (Linux) ./dataload.sh ../samples/DataLoad/Catalog/IntegrateScenario/wc-dataload-kit-bundle.xml

    • (Developer) dataload ..\samples\DataLoad\Catalog\IntegrateScenario\wc-dataload-kit-bundle.xml


Verifying results

The wc-dataload-kit-bundle.xml configuration file loads one kit and one bundle from the KitBundle.csv source file. Verify that the data is loaded by running the following SQL statements:

These SQL statements return details about the kit and bundle, including the list price and offer price.

We can also verify the load by viewing the kit and bundle in the Management Center or in the storefront.


Cleaning up the data

To remove the data loaded in this sample from the database, run the CleanUp.sql file in the /samples/DataLoad/Catalog/IntegrateScenario directory.

Note: After running the CleanUp.sql file, we might see that 0 rows are deleted for certain SQL statements. This result is expected, as not all rows are populated with data in this sample.