You can test an OData data source configuration in the following ways.

Test a data source from the Hybrid Data Pipeline Web UI

Take the following steps to test whether the data source and schema map are configured correctly.

  1. Navigate to the Data Sources view by clicking the data sources icon .
  2. Select the OData-enabled data source definition, and click the link 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 document

Test a data source using a REST client

Take the following steps to test a data source 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 entities

Test 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 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.