skip to main content
Querying with OData Version 4 : Getting started with OData Version 4 : Testing data source configurations (OData Version 4)
  

Try Now

Testing data source configurations (OData Version 4)

You can quickly test the configuration from the Hybrid Data Pipeline dashboard or by using a REST client.
*Testing data source configurations from the Hybrid Data Pipeline dashboard.
*Testing data source configurations using a REST client
*Testing OData functions using a REST client

Testing data source configurations from the Hybrid Data Pipeline dashboard

Take the following steps to test whether your data source definition and schema map are configured correctly.
1. In the left navigation pane, select Data Sources to open your list of data sources.
2. Select the OData-enabled data source definition, and click the OData URI icon at the end of the row.
3. Enter your Hybrid Data Pipeline credentials.
The browser returns an XML document listing the entities in the schema.
XML documentXML document

Testing data source configurations using a REST client

Take the following steps to test a data source configuration using a REST client. In this example, Postman is used as the REST client.
1. Using the controls exposed by the REST client, select basic authorization and enter your Hybrid Data Pipeline credentials.
2. If credentials for your data store are not saved in the data source definition, pass them as values for ddcloud-datasource-user and ddcloud-datasource-password headers.
3. From the OData tab of the data source you are testing, copy the OData Access URI. Then paste the URI in the URL field of the REST client.
4. Execute a GET on the data source endpoint. For example:
GET https://service.myserver.com/api/odata4/db2ds
The response payload returns a list of entities exposed by the OData schema map.
list of entitieslist of entities

Testing OData functions using a REST client

Take the following steps to test OData function invocation using a REST client. Again, Postman is used as the REST client.
1. Using the controls exposed by the REST client, select basic authorization and enter your Hybrid Data Pipeline credentials.
2. If credentials for your data store are not saved in the data source definition, pass them as values for ddcloud-datasource-user and ddcloud-datasource-password headers.
3. From the OData tab of the data source you are testing, copy the OData Access URI. Then paste the URI in the URL field of the REST client. Append the URI with the $metadata endpoint.
4. Execute a GET on the $metadata endpoint. For example:
GET https://service.myserver.com/api/odata4/sample_datasource/$metadata
The response payload returns the OData schema map in XML format. The schema map includes any functions exposed in the OData model.
schema map with exposed functionschema map with exposed function
The function import name can be used to invoke the function independently.
Table names can be used to return data stored in tables.
The function name can be used to invoke the function as part of a $filter query.