Data Load utility table-based mediator and builder
Use the table object builder and table object mediator
to load data directly into a table with the Data Load utility when
a component-based business object mediator does not exist. You can
use the TableObjectMediator
and TableObjectBuilder
to
load your custom data directly into your target database tables. This
mediator and builder can ensure that the data is loaded into the correct
table and columns. You do not have to create a custom business object
mediator and builder or extend an existing mediator or builder.
- You want to load data into a table when a component-based object mediator does not exist for the object that you are loading.
- You are loading data into a table that is updated and you do not want to customize or extend the existing component mediator.
- You are loading custom UserData into an extended table. You can
add your UserData into a default provided sample CSV or XML file.
You can then load this file by using the
TableObjectMediator
andTableObjectBuilder
with the Data Load utility. If you did not customize Management Center or generate custom SDO extensions, use this table-based mediator and builder. If you did customize Management Center or generated SDO extensions to use this UserData, you must first map the custom data to a logic noun UserData field before you load your input file with UserData. For more information about loading data into extended tables, see Loading extension tables.
To use a table-based data load, you must configure the
business object configuration file to use the TableObjectBuilder
as
the business object builder. Within the element that sets the business
object builder, specify the TableObjectMediator
as
the business object mediator that the Data Load is to use. For more
information, see Configuring the business object configuration file.
Benefits
To load custom data, or data that is not support by a component-based mediator, you can use one of the following options:- Use the table-based builder and mediator. This is the recommended option.
- Create a custom component-based mediator or extend an existing component mediator to use with the base business object build.
Component-based builder and mediator | Table-based builder and mediator |
---|---|
|
|
Table-based builder
The TableObjectBuilder
business
object builder works with the TableObjectMediator
business
object mediator. The Data Load utility creates a list of extended
table data objects, which the table object builder populates with
the column values that are included in the input data. The builder
class also populates the data objects with any fixed values that are
defined for the objects in the column definitions that are specified
in the business object configuration file. The Data Load utility passes
the populated list of extended table data object to the TableObjectMediator
.
Table-based mediator
You can use a table-based
mediator that is called the TableObjectMediator
to
convert the data objects into physical objects. To use a table-based
data load, you must know the physical tables that you want to load
data into. You also must know the foreign key relationships, how the
keys generate, and how the generated keys are resolved based on the
unique index. The column values that the Data Load utility can retrieve
from the business contexts must also be known. This mediator accepts
the populated table data objects from the builder class. Any partially
populated table data object is populated with more values with this
mediator to ensure that the data object can be resolved. The mediator
populates the data objects with values from the business context.
The data object IDs are resolved through the business context service
or through the ID resolver. After the data object is populated, the
data object is sent to the data writer to populate the data object
into the appropriate database table.
The mediator class name is com.ibm.commerce.foundation.dataload.businessobjectmediator.TableObjectMediator.