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. We can use the TableObjectMediator and TableObjectBuilder to load our 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. We can use the table-based mediator to load data with the Data Load utility when the following conditions exist:

To use a table-based data load, 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. See Configure the business object configuration file.


Benefits

To load custom data, or data that is not support by a component-based mediator, we can use one of the following options:

Component-based builder and mediator Table-based builder and mediator

  • Benefits

    • Extra validation

  • Disadvantages

    • Physical SDOs must be defined to map data to logical noun before data can be loaded for an object.

    • Need to know the physical SDOs to define how to map to the noun to populate the data

  • Benefits

    • Physical SDOs do not need to be defined to load data for an object.

    • Do not need to know the SDOs for an object

    • You know what physical tables and columns we are loading data to.

    • We can control the mapping and loading of data through configuration, instead of using Java code, which is used by the component-based business object mediators.

    • We can load data, including custom data, from a single row in an input file into one or more database tables, including custom tables.

    • We can load the data in to any table that we want.

    • The performance of the data load process can be better.

  • Disadvantages

    • The TableObjectMediator does not support workspace locking.

    • We need an in-depth knowledge on the database schema, and the physical tables to configure your data load files.

    • If the data in your input files is not mapped to the appropriate database columns, we cannot use table-based mediators.

      Note: Column handler and table handler support is available so that we can use the table-based mediator when your input file columns are not directly mapped to database columns. To use this support, we might need to customize a column handler or table handler to ensure your data loads into the correct table. For more information, see Creating custom column handlers


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 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 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

We can use a table-based mediator called the TableObjectMediator to convert the data objects into physical objects. To use a table-based data load, we must know the physical tables 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 TableObjectMediator.