Odata adapter in SAP cloud integration flow
This is a tutorial to create an integration flow that OData service in the simplest way and we will perform a short exercise to go through how to use OData adapter.
1. Check OData service and entity set
Check the Odata service metadata and the entityset to be consumed. For the purpose of demo, public and free of charge Northwind Odata will be used. The entityset Customer will be used. https://services.odata.org/northwind/northwind.svc/$metadata
2.Create an integration flow
Go to Integration Suite, create a package and add an integration flow.
Below is the end result once you finish. Each event is explained step by step below.
3. For easily test the flow, add a timer and set as run once.
4. From the top bar, choose icon for Call->External Call->Request Reply. Place inside the flow.
5. From the top bar, choose icon participant and choose Receiver. Place it outside the flow.
6. Drag an arrow from the Request Reply box and connect to the receiver outside the flow. Choose Odata V2 as the connection type. Connect the Timer with request reply box as well.
Click on the Odata arrow and set the connection details.
Address | https://services.odata.org/northwind/northwind.svc |
Proxy type | Internet |
Authentication | None |
CSRF protected | x |
Reuse connection | x |
*Always use authentication for production environment! Northwind Odata service. is a public service for everyone to use hence no authentication is needed. OAuth2 authentication is the latest and recommended method and used widely.
Go to Processing tab and fill in the query details. For resource path, click on the Select on the right.
After choosing Select, separate screen to guide the Odata details. Fill in below deitals and make sure to use metadata for the address. Click on Step 2. https://services.odata.org/northwind/northwind.svc/$metadata
Choose Operation GET, Select Entity Customers and tick Select All Fields button. Finish.
Now the details should be set.
7. Choose Persistence icon from the top bar and Data Store Operations -> Write. Place it inside the flow after Request Reply and connect using an arrow. Connect to the end event that comes after.
Click on the Write event and set the processing details as below.
8. Save the change and deploy the integration flow.
Check the data store from Monitor->Integrations and APIs from the left side pane. Go to Manage Data Store tile and find the output with your name.