Db2 Warehouse on Cloud Connector > Mappings and Mapping Tasks with Db2 Warehouse on Cloud Connector > Db2 Warehouse on Cloud Objects in Mappings
  

Db2 Warehouse on Cloud Objects in Mappings

When you create a mapping, you can configure a Source or Target transformation to represent a Db2 Warehouse on Cloud object.

Db2 Warehouse on Cloud Sources in Mappings

In a mapping, you can configure a Source transformation to represent a IBM Db2 Warehouse source.
The following table describes the source properties that you can configure in a Source transformation:
Property
Description
Connection
Name of the source connection. You cannot parameterize the connection at runtime.
Source type
Type of the source object. Select Single Object, Multiple Objects, or Parameter.
To define a parameter, select Parameter as the source type, and then specify the parameter in the Parameter property.
Object
Name of the source object.
Parameter
Select a parameter for the source object, or click New Parameter to define a new parameter for the source object. The Parameter property appears only if you select Parameter as the source type.
The following table describes the query options that you can configure in a Source transformation:
Property
Description
Filter
Filter value in a read operation. Click Configure to add conditions to filter records and reduce the number of rows that the Secure Agent reads from the source.
You can specify the following filter conditions:
  • - Not parameterized. Use a basic filter to specify the object, field, operator, and value to select specific records.
  • - Completely parameterized. Use a parameter to represent the field mapping.
  • - Advanced. Use an advanced filter to define a more complex filter condition.
Sort
Add conditions to sort records.
You can specify the following sort conditions:
  • - Not parameterized. Select the fields and type of sorting to use.
  • - Parameterized. Use a parameter to specify the sort option.
  • - Sort Order. Sorts data in ascending or descending order, according to a specified sort condition.
The following table describes the advanced source properties that you can configure in a Source transformation:
Property
Description
Pre-SQL
The pre-SQL commands to run a query before you read data from IBM Db2 Warehouse.
Post-SQL
The post-SQL commands to run a query after you write data to a target.
Tracing Level
Sets the amount of details that appear in the log file.
You can choose terse, normal, verbose initialization, or verbose data. Default is normal.

Configuring Key Range Partition

Configure key range partition to partition Db2 Warehouse on Cloud data based on field values. Key range is supported for only the numeric and date/time data types.
You can configure key ranges for the following data types:
Perform the following steps to configure a key range partition:
    1In Source Properties, click the Partitions tab.
    2Select the required Partition Key from the list.
    3Click Add New Key Range to add partitions.
    The following image displays the details of the Partitions tab. The Edit Partition Point dialog box shows Partition#1 and Partition#2. Partition#2 is selected. At the bottom of the dialog box is the partition type selection list. Key Range is selected.
    4Specify the Start range and End range.

Db2 Warehouse on Cloud Targets in Mappings

To write data to IBM Db2 Warehouse, configure a IBM Db2 Warehouse object as the target in a mapping.
Specify the name and description of the IBM Db2 Warehouse target. Configure the target and advanced properties for the target object
The following table describes the target properties that you can configure in a Target transformation:
Property
Description
Connection
Name of the target connection. You cannot parameterize the connection at runtime.
Target Type
Type of the target object. Select Single Object or Parameter.
If you select Parameter, specify an input parameter for the target object in the Parameter property.
When you use a parameter, you specify the target table for the parameterized object on the Targets page of each mapping task associated with the mapping.
Object
Name of the target object. You can select an existing target object from the displayed list.
Create New at Runtime property is not applicable.
Parameter
Select or create a parameter for the target object. Appears only when the target type is Parameter.
Operation
Target operation. Select Insert, Update, Upsert, Delete, or Data Driven.
The following table describes the advanced target properties:
Property
Description
Update Mode
Specifies the mode to write data to IBM Db2 Warehouse target.
You can specify the following modes:
  • - Update As Update. Updates all rows flagged for update if the entries exist.
  • - Update Else Insert. Updates all rows flagged for update if the entries exist in the target. If the entries do not exist, the Secure Agent inserts the entries.
Truncate Target
The Secure Agent truncates the target before writing the data.
Pre-SQL
The pre-SQL commands to run a query before you read data from a source.
Post-SQL
The post-SQL commands to run a query after you write data to IBM Db2 Warehouse.
Forward Rejected Rows
Determines whether the transformation passes rejected rows to the next transformation or drops rejected rows. By default, the agent forwards rejected rows to the next transformation.