A custom resource mapping can contain a Read transformation with different ports than the Output transformation. A custom resource mapping can contain more transformations than the Read transformation and the Output transformation.
You can create a custom resource mapping by modifying a default resource mapping or by manually creating a REST web service.
The following image shows a custom resource mapping:
The mapping contains the following transformations:
Read transformation
Reads a file of orders. Each order contains the customer ID. Customer ID can occur multiple times.
Sorter transformation
Sorts the orders by customer ID.
Aggregator transformation
Sums the total order amount for each customer.
Output transformation
Returns the total amount of the orders by customer.
To create this custom resource mapping, manually define the REST web service resource definition. When you manually define the resource definition, you define the elements in the response message. For this example, the response message contains just the customer ID and the total order amount.
After you define the resource definition, the Developer tool creates a resource mapping that contains an Output transformation. You then add the Read transformation and the other transformations to the mapping.
The customer ID in the previous image is the key. A web service client might request the number of orders for a specific customer. The Data Integration Service filters the output data by the key. The mapping does not contain a Filter transformation.