You can use the family of transform builders to modify the results of an existing data service operation.
The following steps use the SQL Call builder as an example for a data service in a model. The procedure applies for any data service provider builder.
- Create the data service in your provider model.
For example, add a SQL Call builder and configure it.
- Add a Transform Map builder to follow the data service builder.
- In the Transform Map builder, in the Apply Transform To input, specify Target Operation Results.
- In the Target Operation input, specify the following operation.
- Add a Service Operation builder to follow the Transform Map builder and, in the Action To Call input, specify the following operation.
When the service operation is invoked, it calls the transform map. The transform map invokes the SQL call, operates on the results of the SQL call, and returns the transformed data. The service operation returns the transformed data and uses the result schema from the transform map.
If you use the Web Service Multiple Operations builder, for each operation that you need to transform, add to your model a Transform Map builder and Service Operation builder as described. You must ignore the non-transformed operations in your service provider (those provided directly by the Web Services Multiple Operations builder). To avoid confusion, it helps to disable the Create Service Definition
input (a checkbox) in the Web Service Multiple Operations builder. Then, add your own Service Definition builder and Service Operation builders for each operation that you want to expose. These steps avoid listing the non-transformed versions of the operations in the service.
Parent topic: Using transform builders in a service provider model