JDBC V2 Connector > Mappings and elastic mappings in JDBC V2 Connector > JDBC V2 targets in mappings and elastic mappings
  

JDBC V2 targets in mappings and elastic mappings

When you configure a mapping or an elastic mapping to use a JDBC V2 target, you can configure the target properties.
Specify the name and description of the JDBC target. Configure the target and advanced target properties for the JDBC object in a Target transformation.
You can parameterize the target and advanced target properties for the JDBC target object in a mapping or an elastic mapping.
The following table describes the target properties that you can configure in a Target transformation:
Property
Description
Connection
Name of the target connection.
Target Type
Target type. Select one of the following target types:
  • - Single. Select to specify a single JDBC object.
  • - Parameter. Select to specify a parameter name. You can configure the target object in a mapping task associated with a mapping or an elastic mapping that uses this Target transformation.
Object
Name of the target object. You can select an existing object.
Create New at Runtime
Creates a target table at runtime based on the table type and the path you specify. To create a target table at runtime, provide the following parameters:
  • - Object name. Specify the name for the target table.
  • - Path. Specify the target table name and schema in the following format: <Schema-Name>/<TableType>, where the mandatory value for TableType is TABLE.
Operation
Type of the target operation.
Select Insert, Update1, and Delete1.
1Applies only to mappings.
The remaining properties are applicable for both mappings and elastic mappings.
The following table describes the JDBC advanced target properties that you can configure in a Target transformation:
Advanced Target Property
Description
Pre SQL
The SQL statement to run before writing data to the target.
Post SQL
The SQL statement to run after writing data to the target.
Truncate Target
Truncates the target table before inserting records to the target.
Reject Truncated/Overflow Rows
Writes truncated and overflow data to the reject file. If you select Reject Truncated/Overflow Rows, the Data Integration Service sends all truncated rows and any overflow rows to the reject file.
Table Name
Overrides the table name used in the metadata import with the table name that you specify.
Schema Name
Overrides the schema name of the target object.
If you specify the schema name both in the connection and the target properties, the Secure Agent considers the schema name specified in the target properties.
Update Mode
Not applicable.
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.

Create a target table at runtime

You can use an existing target or create a target to hold the results of a mapping. If you choose to create the target, the agent creates the target when you run the task.
Note: Before you create a target table at runtime in PostgreSQL or Azure SQL Database, select the appropriate database type in the JDBC V2 connection.
To specify the target properties, perform the following tasks:
    1. Select the Target transformation in the mapping.
    2. On the Incoming Fields tab, configure field rules to specify the fields to include in the target.
    3. To specify the target, click the Target tab.
    4. Select the target connection.
    5. For the target type, choose Single Object or Parameter.
    6. Specify the target object or parameter.
    7. To specify a target object, perform the following tasks:
    1. a. Click Select and choose a target object. You can select an existing target object or create a new target object at runtime and specify the object name.
    2. You must specify the target table name.
    3. b. To create a target object at runtime, select Create New at Runtime.
    4. c. Enter the name of the target table that you want to create name in the Object Name field.
    5. d. In the Path field, specify the target table name and schema in the following format: <Schema-Name>/<TableType>, where the mandatory value for TableType is TABLE.
    6. For example, private/TABLE
      In the example, the table is created in the schema named "private" in the database server. If you do not specify a value for the path, the Secure Agent considers the schema name you specified in the connection. If you did not specify a schema name in the connection, the Secure Agent creates the table in the default schema.
    7. e. Click OK.
    8. Specify the advanced properties for the target, if required.

Rules and guidelines for creating a target at runtime

When you configure a mapping with the Create New at Runtime option, consider the following rules: