Tutorials > Program model


Next >


Customize the Data Load utility

This tutorial demonstrates how to customize the data load utility to load data from an XML file.

In the tutorial "Adding new properties to a WebSphere Commerce service using the data service layer", you customize the Catalog service to support warranty information and care instructions for catalog entries. Now, you load the warranty and care instruction information into the target database using the Data Load utility.

The following diagram shows the data load process flow.

  1. The data reader reads the input file, and transforms the input into a data object. Data objects are typically Map objects.

  2. The business object builder instantiates the business object and populates it from the data in the data object.

  3. The business object mediator converts the business object into physical object.

  4. The data writer writes the physical object into the database.

The provided CSV reader reads the input files and create Map objects. XML files are difficult to represent in a Map object because they have complex structures. In this scenario, you create a reader that builds the logical object directly from the input XML file. Since this reader is creating a logical object, the default business object builder is used. The default business object builder simply returns the input data object without changing it.


Learning objectives

After completing this tutorial, you should be able to:


Time required

This tutorial is expected to take 1 hour to complete.


Skill level

Intermediate


Audience

This tutorial is intended for WebSphere Commerce developers who want to customize the data load utility to read from XML files.


System requirements

Before beginning this tutorial ensure that you have fulfilled the following prerequisites:


Prerequisites

Saving the sample code

Before beginning this tutorial, download the DataLoadSample.zip. Save this file onto the development machine. As an example, you might save it into the WCDE_INSTALL directory.

Knowledge prerequisites

Before beginning this tutorial, ensure you have:


Lessons in this tutorial

Next >


+

Search Tips   |   Advanced Search