Design > System Services, Listeners and Connectors > Using the OData Provider
  

Using the OData Provider

OData is a REST-based and standardized protocol that provides access to data over the Web. You can use the OData protocol to access data services from the Cloud, including internal data sources like those available with a JDBC connection.
OASIS has standardized on OData V4. Informatica recommends that you use version to use OData V4, and it is the default version.
Your organization can expose OData feeds on an endpoint such as:
https://[host].rt.informaticacloud.com/active-bpel/odata/[version]/[connection name]/[data source name]
For example, these two endpoints expose the sampleparts table:
~or~
Data is available in Atom XML format or JSON, including support for the XML content-type.
When the OData schema is generated, note the following:
You can enable OData in connections configured to run on Secure Agents. The Secure Agent, rather than opening a port, opens up an outbound connection to the Informatica Cloud servers through which all communication occurs. The Secure Agent then has access to any on-premises applications or data sources.
Note: If you publish an OData enabled connection to a Secure Agent, the OData URL on the Connection page is an Informatica Cloud URL.
You do not see a Secure Agent URL. To construct the Secure Agent URL, replace all text odata/v4/Oracle in the Informatica Cloud URL with https://<host>:<port>/process-engine/.
For example, if the Informatica Cloud URL is https://ps1w2.rt.informaticacloud.com/active-bpel/odata/v4/Oracle, the Secure Agent URL is https://localhost:7443/process-engine/odata/v4/Oracle.

Supported OData V4 and OData V2 URI Conventions

You can use many OData V4 and OData V2 URI conventions to access data.

Supported OData Version 4 Conventions

You can use the following OData V4 URI conventions to access data:
See here for the complete OData V4 specification for URI conventions.

Supported OData Version 2 Conventions

Informatica recommends that you use OData V4. However, you can use the following OData V2 URI conventions to access data:
See here for the complete list of OData V2 specification for URI conventions.

Custom Composite Keys

When you use OData to access a JDBC connector, you can define and edit custom composite keys. You define a custom composite key when a database entity does not have a primary key. With this custom composite key that you create, you can perform read operations on the JDBC database.
To use custom composite keys, you must use OData V4.

Primary Keys and Custom Composite Keys

A primary key is an object field (a column in a database table or a database view) or a set of object fields (columns in a database) that can uniquely identify each record in a database table or database view. You use primary keys to query objects in the database.
If an entity does not have a primary key, you can define a custom composite key for the entity. To create a custom composite key, manually select a field or multiple fields for that key. The custom composite key takes the place of the primary key, and you can use it to read data from a JDBC database.
Example: You connect to a JDBC database of employee records and you see that the entity empaccount does not have a primary key. You can manually select the fields email, ID, and name to define a custom composite key for empaccount.
You can also edit custom composite keys that you created. If you defined a custom composite key that references an entity that no longer exists, you can remove the key. If a custom key contains fields that no longer exist, you can remove these fields.

Viewing the Custom OData Entity Keys Section

    1 Enable OData and publish a JDBC connection.
    2Click the Published Metadata tab.
    You see a new section, Custom ODataEntity Keys, with the following information:
    3Click Edit Custom Keys.
    The Custom OData Entity Keys dialog box opens.
    The following image shows the Custom OData Entity Keys dialog box:
    You see a dialog box with eight entities on the left side, and a list of corresponding fields on the right side.
    On the left side, you see three types of entities:
    On the right side, you see a list of fields that you can map to create a custom composite key.

Creating OData Custom Composite Keys

To create OData custom composite keys, you select entities that you want to use as primary keys.
    1Click Edit Custom Keys.
    2Select an entity from the list of entities.
    3Select the fields that you want to use as a custom key. You can select multiple fields.
    Important: Ensure that you analyze the data and select fields that uniquely identify each record in the database table or view. For example, if you want to use the fields FirstName and LastName to create a custom composite key, you cannot have two employees with the same first and last names.
    4Click Apply.
    You see the custom composite key that you created in the list under Custom ODataEntity Keys.

Editing Custom Composite OData Keys

You can edit and delete custom composite OData keys.

Publish Validation

When you publish a connection, Informatica Process Designer checks the custom composite keys you created and displays a warning if it encounters any potential issues.
The following image shows a sample warning message:
This images shows a warning stating that some entities cannot be found, some entities have invalid custom keys, and that some entities already have primary keys