The Developer tool creates a resource mapping that contains the REST Output transformation that you created. Define a Read transformation and a Lookup transformation in the resource mapping.
In the
Resources
tab, expand the
Resource Mappings
link in the Orders_Resource.
The following image shows the Orders_Resource link in the Orders_Resource:
Click the
Orders_ResourceGetMapping
link in the Orders_Resource.
The mapping appears in the editor.
Add the Customer data object to the mapping as a Read transformation.
Click the REST Output transformation.
On the REST Output transformation
Properties
tab, click the
Ports
view.
Change the precision of the Customer_Key to 15 and the precision of the Customer_Name to 25.
Connect the Customer Key and the Customer Name ports from Read_Customer to the REST Output transformation.
The following image shows the links between the Read_Customer transformation and the REST Output transformation:
To add the Lookup transformation, right-click in the mapping and click
Add Transformation
.
Select the Lookup transformation.
Choose Relational Data Object Lookup and click
Next
.
In the
New Lookup Transformation
dialog box, browse for and select the Orders physical data object. Choose to return all rows.
Click
Finish
.
The Lookup transformation appears in the resource mapping.
Click the Lookup transformation in the mapping to select it.
In the Lookup transformation
Properties
view, select the
Ports
tab.
Add a port called Customer_In. The port is a string with a precision of 15. You do not need to enable it for output.
In the Lookup transformation
Properties
view, click the
Lookup
tab.
Enter the following lookup condition:
O_CUSTKEY = Customer_In
In the mapping canvas, link the C_CUSTKEY port from Read_Customer to the Customer_In port of the Lookup transformation.
Link the following output ports from the Lookup transformation to ports in the REST Output transformation: