REST V2 Connector Guide > Mapping and Mapping Configuration Tasks with REST Connector > REST Targets in Mappings
  

REST Targets in Mappings

When you select a REST connection for a Target transformation, you can select an operation. The operation is based on the swagger specification file that you specify during the REST connection configuration.
You can add multiple input groups into the REST target and define the primary and foreign key relationships between the multiple input groups before the mapping.

Advanced Target Properties

In a mapping, you can configure a target to represent a REST target. For REST target connections used in Mapping Configuration tasks, you can configure advanced properties in the Targets page of the Mapping Configuration Task wizard.
The following table describes the advanced properties that you can configure in a Target transformation:
Property
Description
Cache Size for Web Service Request (KB)
Memory available for the web service request. If the web service request contains many rows or columns, you might want to increase the cache size. Default is 1024 KB.
Transaction Commit Control
Control to commit or roll back transactions based on the set of rows that pass through the transformation. Use the transaction commit control if you have a large amount of data and you want to control how it is processed.

REST Target Mapping Example

You are a human resources administrator and you want to update the legal name of an employee in Apache CouchDB.
To update a legal entry for an employee in CouchDB from a flat file, perform the following tasks:
    1. Create a flat file connection to read data from the flat file.
    2. Create a REST connection to write data to CouchDB.
    The following image shows the configured CouchDB connection:
    3. Create a CouchDB mapping.
    4. Add a Source transformation to include the flat file object that contains the employee details. Add the flat file connection.
    5. Add a Target transformation to write the employee details to CouchDB. Perform the following tasks on the Target tab:
    1. a. In the Connection field, select the REST connection to connect to CouchDB.
    2. b. In the Operation field, select CouchDBPost as the operation.
    3. The following image shows the CouchDBPost in the list of write operations:
    4. c. In the Advanced Properties section, set the cache size and the transaction commit interval.
    6. On the Field Mapping tab, select the input elements to map to the target fields.
    The following image shows all the mapped fields between the input file and the CouchDB target:
    7. When you save and run the mapping in a Mapping Configuration task, the Secure Agent creates the employee details in CouchDB.