You are a human resources administrator and you want to retrieve details of an employee from Apache CouchDB.
To retrieve employee details from CouchDB and to write the employee details to a flat file, perform the following tasks:
Create a REST V2 connection to read data from CouchDB.
The following image shows the configured CouchDB connection:
Create a business service to associate the REST V2 connection and an operation.
The following image shows the configured business service:
Create a REST V2 mapping.
Add a Web Services transformation. Specify a name and description in the general properties.
On the
Web Service
tab, select the business service and the operation that you configured. Also, specify paging parameters.
The following image shows the configured web service:
On the
Request Mapping
tab, map the incoming fields from the source to the respective fields in CouchDB.
On the
Response Mapping
tab, select the employee details fields that you want to write to the target file on the
Response Structure
.
On the
Advanced
tab, specify the cache size details.
The fields that you selected from the
Response Structure
of the Web Service transformation appear as incoming fields for the target object.
If required, map the incoming fields to the flat file fields.
Click
New
Tasks
Mapping Task
, and select the mapping for the task.
When you save and run the
mapping
task, the Secure Agent retrieves the employee record for the employee that you map on the Request Mapping tab from CouchDB and writes the data to the corresponding flat files.