Configure a data source for OData connectivity
- Last Updated: March 25, 2025
- 10 minute read
- Hybrid Data Pipeline
- Documentation
Take the following steps to create a data source with OData Version 4 connectivity.
-
Open the Web UI, and sign in with your Hybrid Data Pipeline
credentials.
The URL for the Web UI takes the following format.
https://domain_name:port/hdpui
where
- domain_name
- is the domain name or IP address of the Hybrid Data Pipeline host.
- port
- is the port listening for connections to the Hybrid Data Pipeline service. A port number may be optional in some cases, such as when a public DNS is defined as a CNAME, or when ports 80 or 443 are used.
- hdpui
- is the path to Hybrid Data Pipeline Web UI.
For further details, refer to Logging in to the Web UI in the User's Guide.
-
Navigate to the Data Sources view by
clicking the data sources icon
.
- Click + NEW DATA SOURCE to open the Data Stores page.
-
From the list of data stores, click data store to which you want to
connect.
Note:
- Numerous data stores are supported. Refer to Supported data stores for the complete list.
- Third party integrations are also supported. Refer to Using third party JDBC drivers for details.
- Connectivity to multiple REST services is supported with the Autonomous REST Connector. For details, refer to Creating and using REST data sources.
- On the General tab, provide values for parameters.
-
Select the OData
tab.
Important: Record the OData Access URI. This is the URI you will use to expose your data as an external object in Salesforce. You may also obtain the URI after saving the data source by clicking the link icon on the Data Sources page.
- For OData Version, select Version 4.
-
Select a case for entity and property names from the
OData Name Mapping Case
dropdown.
Note: If an entity or property has an alias defined in the data source, then the option selected in the OData Name Mapping Case is not applied to it.
-
Open the Configure Schema editor by clicking Configure to the right of the Schema Map field.
-
Select a schema from the Select Schema dropdown.
Note: By default, Hybrid Data Pipeline exposes all schemas on any backend data stores that support multiple schemas. The Metadata Exposed Schemas option on the Advanced tab for any such data store can be used to limit exposed schemas to a single schema. If a schema is selected for the Metadata Exposed Schemas option, it will be the only schema available on the Configure Schema editor's Select Schema dropdown.
-
From the Tables and
Columns tab, select and define the tables and columns you want
to expose to OData client applications.
- To add all tables, click Add All Tables on the Tables panel.
- To add individual tables, select a table on the Tables panel and click Add To Map in the Settings panel to the right.
- To remove a table that was previously added, select the table and click Remove From Map in the Settings panel.
- To specify singular and plural alias names for a
table, select the table, enter the table alias for the entity type name
in the Singular Name field,
enter the table alias for the entity collection name in the Plural Name field, and click
Add To Map. Note: The singular alias name specified is used as the entity type name, while the plural alias name will be used as the entity collection name. When alias names are not specified, the mapping of entity names will be dictated by the Entity Name Mode setting in the OData Settings tab, as described in Step 9.
- To specify a column as a primary key, select the
column from the Columns panel
and set the Is Primary Key
switch from OFF to ON.Note: The Configure Schema editor indicates that a primary key exists for a table with a star icon. A primary key assigned in the backend data store cannot be changed. If a primary key has not been discovered for a table you wish to map, one or more columns must be specified as a primary key.
- To remove a column from the OData schema map, select the column from the Columns panel and click Remove From Map in the Settings panel.
-
From the Tables and
Columns tab, select the columns you want to view or
modify.
- To specify an alias name for a column, select the column and enter an alias in the Alias Name field. If specified, the alias name will be used as the OData name for the column. If not specified, the name of the column will be used as the OData name.
- To specify a column as a primary key, set the
Is Primary Key switch from
OFF to ON.Note: The Configure Schema editor indicates that a primary key exists for a table with a star icon. A primary key assigned in the backend data store cannot be changed. If a primary key has not been discovered for a table you wish to map, one or more columns must be specified as a primary key.
- Open Advanced
Settings to review and modify column metadata. The
Advanced Settings allow
you to modify column metadata returned by the underlying JDBC driver.
This is especially useful when the JDBC driver returns incorrect
metadata. The Driver Value of
each setting indicates the value that is returned by the driver. You can
specify settings related to the following properties:
- Data
Type: Indicates the data type for the column. If
you wish to use the Actual
Value, you can leave the Data Type as Default. If you wish to
override the data type specified, you can choose an alternate
data type from the dropdown list. Note: Depending on the data types selected, some of the Advanced settings options will be enabled or disabled. For example, Scale is enabled for the decimal datatype, and not for the integer datatype.
- Column Size or Precision: Indicates the maximum precision or maximum length of the column.
- Scale: Indicates the maximum scale of the column.
- Is Nullable: Indicates whether the column can have a null value. Normally drivers report this correctly. Some drivers may report a column as not nullable while null values exist in the column. In such a scenario, the is Nullable could be set to true to correct this issue. Note that there could be implications on the create entity behavior by changing this setting.
- Is Auto Increment: Indicates whether the column is a uniquely generated column. Setting this to true will indicate to the service that it should ignore incoming values for this column during the create, update, and patch entity operations.
- Is Generated: Indicates whether the column is a generated value. If the column is generated, then the OData code will ignore incoming values for this column during the create, update, and patch entity operations.
- Data
Type: Indicates the data type for the column. If
you wish to use the Actual
Value, you can leave the Data Type as Default. If you wish to
override the data type specified, you can choose an alternate
data type from the dropdown list.
-
Take the following steps to enable text search for individual tables and
text-based columns using the
$searchsystem query option.- Select a table from the Tables panel.
-
Specify a search option from the Search Options dropdown. Then click
Add To Map.
- Full Text is only available for data store types that support indexing and full text search.
- Substring enables searches for the string anywhere in the search-enabled fields.
- Begins restricts the search to the text at the beginning of a field.
-
If you selected Full
Text in Step b, you should
select an index type for all text-based columns. Select the column from
the Columns panel, and specify
an index type from the Index
Type dropdown in the Settings panel. Then click Add To Map.
The index type is the type of index supported by the backend data store. TEXT is the only valid value for the DB2 and SQL Server data stores. CONTEXT and CTXCAT are the valid values for the Oracle data store. If Full Text has been selected but the data store index has not been properly configured, queries using
$searchwill return errors. - If you selected Substring or Begins in Step b, you should select which text-based columns can be searched. Select the column from the Columns panel, and set the Is Searchable switch to ON. Then click Add To Map.
-
Take the following steps to expose stored functions.
Note: Stored functions are supported only for DB2, Oracle, PostgreSQL, and SQL Server data stores. Refer to Stored functions support in the User's Guide for details on further restrictions.
- Select the Functions tab.
- Select the function you want to expose from the Functions panel.
- If desired, specify an alias name for the stored function.
- If desired, specify an import alias name for a function import that corresponds to the function.
- Specify whether the OData type is a function or an action on the OData Type dropdown.
- Click Add To Map.
-
Specify general settings on the OData Settings tab. Then
click Add To Map to apply settings.
- From the Entity Name Mode dropdown, specify the
algorithm used to map table names to entity collection names or entity
type names. Entity collection names are usually plural, while entity
type names are usually singular.
- When guess (default) is selected, one of
the following algorithms is applied based on an evaluation of
the table name.
- If the table name ends with a numeric digit, the table name is used as the entity collection name and a suffix is appended to the table name for the entity type name. The suffix used can be specified in the Singular Suffix field.
- If the table name does not end with a digit and appears to be singular, the table name is used as the entity collection name and singularized for the entity type name.
- If the table name does not end with a digit and appears to be plural, the table name is used as the entity type name and pluralized for the entity collection name.
- When singularize is selected, the table name is used as the entity collection name. The table name is then singularized for the entity type name.
- When pluralize is selected, the table name is used as the entity type name. The table name is then pluralized for the entity collection name.
- When suffix is selected, the table name is used as the entity collection name. For the entity type name, a suffix is appended to the table name. The suffix used can be specified in the Singular Suffix field.
- When guess (default) is selected, one of
the following algorithms is applied based on an evaluation of
the table name.
- With the Time As String switch, specify how the
JDBC type Time should be mapped.
- If set to OFF (default), Time is mapped to the OData type TimeOfDay.
- If set to ON, Time is mapped as String.
- In the Singular Suffix field, enter the suffix that will be appended to an entity type name when the Entity Name Mode has been set to either guess or suffix.
- With the Unbound Number as Double switch, specify
whether decimal columns and parameters with no precision or scale should
be automatically mapped as Double.
- If set to OFF (default), decimal columns and parameters with no precision or scale are not automatically mapped as Double.
- If set to ON, decimal columns and parameters with no precision or scale are automatically mapped as Double.
- From the Entity Name Mode dropdown, specify the
algorithm used to map table names to entity collection names or entity
type names. Entity collection names are usually plural, while entity
type names are usually singular.
-
Click the Review Schema Map tab to review the OData
schema map in JSON format.
- Click Save Map to save your configuration of the OData schema map.
-
Set OData options to the desired values.
- Page Size
controls the number of results returned in one response. By default, the
value in this field is
0which causes Hybrid Data Pipeline to return up to 2,000 top-level entities per response. If the response contains more than 2,000 entities, the first 2,000 entities are returned and the end of the response contains a link that the OData client can use to fetch the next set. You can set the page size by using values from 1 to 10,000. Client requests can also specify the size of results with query parameters. - Refresh Result determines whether Hybrid Data Pipeline returns results from the cache (for entities in the cache) or queries the data source again. A value of 1, the default, allows Hybrid Data Pipeline to satisfy requests from cached results. A value of 0 forces queries to the backend data store. If caching is not enabled, this parameter has no effect.
- Inline Count
Mode controls how Hybrid Data Pipeline handles requests that
include the
$countparameter with a value oftrue. The response includes the total number of entities that satisfy the query. A value of 0 causes Hybrid Data Pipeline to skip counting. A value of 1 causes Hybrid Data Pipeline to run a separate query to get the count before the query that returns the entities. This can result in the first page of results being returned faster for large result sets for some data store types. A value of 2, the default, causes Hybrid Data Pipeline to fetch all results and calculate the total number before returning the first page of results to the client. - Top Mode allows
Hybrid Data Pipeline to better handle requests that include the
$topparameter. A value of 0, the default, indicates that clients using$topto limit result set size will rarely attempt to get additional entities using the$skipparameter. A value of 1 indicates that clients generally use$topand$skiptogether to paginate results. - OData Read Only controls read/write access. For a new data source definition, this option is not selected by default. For a data source definition where OData was enabled before this option was available, it will be checked by default. Remove the check mark to enable write access.
- Page Size
controls the number of results returned in one response. By default, the
value in this field is
- Click Update to save your work.
What to do next:
- Test the OData-enabled data source
- Create an OData data source group if you want to expose multiple data sources as a single OData endpoint.
- Create an external object with Salesforce Connect.