Tutorial: Loading data into custom tables with the Data Load utility

This tutorial demonstrates how to use a table-based business object builder and mediator to load data into extended or custom database tables.

By default the Data Load utility supports a table object builder and table object mediator class for loading data directly into a database table. This table-based builder and mediator can be used to load data when there is no component-based business object mediator available that supports the loaded objects. This table-based builder and mediator can also be used to load custom data into custom database tables when physical SDOs are not defined for the data that is being loaded. The table-based builder and mediator is used by the Data Load utility to map and then load the data to the appropriate database tables. To use the table object builder and table object mediator, you do not have to map the data to a logical noun, create a custom business object mediator or builder, or extend an existing mediator or builder. The table object builder and mediator are specified and configured within the data load business object configuration file.

For more information about the table object builder and mediator, see Data Load utility table-based mediator and builder.

The following diagram shows the data load process flow.

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. In this tutorial, the default CSV data reader is used to read a provided sample CSV input file.
  2. The business object builder instantiates the business object and populates it from the data in the data object. The table object builder is used in this tutorial as the business object builder for instantiating and populating the business objects.
  3. The business object mediator converts the business object into physical object. The table object mediator is always used with the table object builder. This table-based mediator is used as the business object mediator in this tutorial to convert the business objects.
  4. The data writer writes the physical object into the database. This tutorial uses the default data writer to write the generated physical objects into the database.

Learning objectives

After completing this tutorial, you should be able to complete the following tasks:
  • Configure the Data Load utility to use the table object builder and table object mediator
  • Configure the table object builder to load data into custom tables

Time required

This tutorial is expected to take 1 hour to complete.

Skill level

Intermediate

Audience

This tutorial is intended for WebSphere Commerce administrators who want to configure and run Data Load utility to load data into custom tables.

Prerequisites

Before you begin this tutorial, ensure that you complete the following tasks.
  • Install WebSphere Commerce Developer version 7. This tutorial uses a WebSphere Commerce development environment to create custom database tables, and run the Data Load utility to populate the tables. You can choose to configure the Data Load utility and run this utility in an authoring or production environment.
  • Download the sample WarrantyTableLoad.csv data load input file to a temporary directory.
Ensure that you have an understanding of the following concepts and tasks.