ODBC Connector > Mappings and mapping tasks with ODBC Connector > ODBC targets in mappings
  

ODBC targets in mappings

In a mapping, you can configure a Target transformation to represent a single ODBC target.
The following table describes the ODBC target properties that you can configure in a Target transformation:
Property
Description
Connection
Name of the target connection.
You can select an existing connection, create a new connection, or define parameter values for the target connection property.
If you want to overwrite the target connection properties at runtime, select the Allow parameter to be overridden at run time option.
Target Type
Type of target object. Select Single Object or Parameter.
Parameter
A parameter file where you define values that you want to update without having to edit the task.
Select an existing parameter for the target object or click New Parameter to define a new parameter for the target object.
The Parameter property appears only if you select parameter as the target type.
If you want to overwrite the target object at runtime, select the Allow parameter to be overridden at run time option.
When the task runs, the Secure Agent uses the parameters from the file that you specify in the advanced session properties.
Object
The target object for the task. Select the target object.
Parameter
The parameter for the target object. Create or select the parameter for the target object.
Note: The parameter field appears only if you select parameter as the target type.
Operation
The target operation. Select the target operation. Select Insert, Update, Upsert, Delete or Data Driven.
Note: Irrespective of the type of write operation you select, you must ensure that you have the privileges for the Delete, Insert, and Update operations for the mapping to run successfully.
Truncate Target
Truncates the database target table before inserting new rows. Select one of the following options:
  • - True. Truncates the target table before inserting all rows.
  • - False. Inserts new rows without truncating the target table
Default is False.
Note: The truncate target property is not applicable for virtual tables.
Forward Rejected Rows
Determines whether the transformation passes rejected rows to the next transformation or drops rejected rows. By default, the mapping task forwards rejected rows to the next transformation.
Update Override
An update SQL statement that updates the data in an ODBC target table. The update SQL statement you specify overrides the default update statements that the Secure Agent generates to update the target based on key columns. You can define an update override statement to update target tables based on both key or non-key columns.
In the override statement, you must enclose all reserved words in quotation marks.

Configuring an update override for the target

To override the default update SQL statement that the Secure Agent generates, you can specify an SQL statement in the Update Override field of the advanced target properties.
    1. Next to the Update Override field, click Configure.
    2. In the Update Override SQL Editor dialog box, enter the update SQL statement that the Secure Agent must use.
    3. Click Generate SQL to generate an SQL query.
    4. Click Format SQL to format the SQL query you entered.
    You can modify the generated SQL query in the SQL editor based on your requirement.
    5. Click OK.