# tSAPODataInput

Retrieves data from an OData web service. With this component, you can send parameters in URLs and bodies to query the information you need from the OData web service.

## tSAPODataInput Standard properties

These properties are used to configure tSAPODataInput running in the Standard Job framework.

The Standard tSAPODataInput component belongs to the Business family.

The component in this framework is available in all subscription-based Talend products.

This component is available only when you have installed the 8.0.1-R2025-06 Talend Studio monthly update or a later one delivered by Talend. For more information, check with your administrator.

## Basic settings

| Properties | Description |
| --- | --- |
| Property type | Either Built-in or<br>Repository<br>.<br><br><ul> <li> <span>Built-in</span>: No property data stored                        centrally.</li> <li> <span>Repository</span>: Select the repository                        file in which the properties are stored. The fields that follow are                        completed automatically using the data retrieved.</li> </ul> |
| OData version | Select the version of the OData protocol you want to use. |
| Root URL | Type in the URL address identifying the base URL of the SAP OData service<br>you want to access, that is to say the host and port of the SAP server. |
| Username and Password | Enter the credentials used as basic authentication to access the server.<br><br>Information noteTip: To enter a password, a token, or a<br>client secret key, click the [...] button next to the<br>corresponding field to bring out the Enter a new<br>password dialog box, enter the password, the token, or the<br>secret key in the text field, and click OK. Note that<br>you can enter either a JSON string in the pure password mode<br>or a Java expression in the Java mode. You can toggle<br>between the two modes by clicking switch to Java mode or<br>switch to pure password mode on the top of the text<br>field. |
| Path | Enter the catalog service path.<br><br>Example:<br><br>Root URL = http://&lt;server&gt;:&lt;port&gt;<br>and Path =<br>/sap/opu/odata4/IWFND/config/default/iwfnd/CATALOGSERVICE |
| Guess catalog service path | Click this button to retrieve the default path of the SAP OData catalog<br>service. For more information, see [Catalog service](https://help.sap.com/doc/saphelp_nw74/7.4.16/en-US/7c/a326519eff236ee10000000a445394/content.htm?no_cache=true). |
| OData V4 parameters (optional) | Specify the extra parameters needed to fine-tune your request to the service:<br><br><ul> <li> <p><span>Search by API group ID</span>: Use this field to filter                           the list on the API group identifiers by adding an asterisk (*) at the                           beginning or end of the value. </p> </li> <li> <p><span>Search by API description</span>: Use this field to                           filter the list on the API descriptions by adding an asterisk (*) at the                           beginning or end of the value. </p> </li> <li> <p><span>API group ID</span>: Select the identifier of the group                           you want to retrieve. This list is populated based on the two previous                           parameters.</p> </li> </ul><br><br>For more information, see [The Groups and related API](https://help.sap.com/docs/SAP_JAM_COLLABORATION/9981b6fb8453459d8103a04d674ebe0f/cc2bb683ad4a445b95e296be924ea3f0.html). |
| OData V2 parameters (optional) | Specify the extra parameters needed to fine-tune your request to the service:<br><br><ul> <li> <p><span>Search by service ID</span>: Use this field to filter on                           the service identifiers by adding an asterisk (*) at the beginning or end                           of the value. </p> </li> <li> <p><span>Search by service description</span>: Use this field to                           filter the list on the service descriptions by adding an asterisk (*) at                           the beginning or end of the value.</p> </li> <li> <p><span>Search by service type</span>: Use this field to filter                           the list on the service types by adding an asterisk (*) at the beginning                           or end of the value.</p> </li> <li> <p><span>Search by service version</span>: Use this field to                           filter the list on the service versions by adding an asterisk (*) at the                           beginning or end of the value.</p> </li> <li> <p><span>Search by service author</span>: Use this field to filter                           the list on the service authors by adding an asterisk (*) at the                           beginning or end of the value.</p> </li> </ul> |
| Service URL | Select a service URL from the list. Values are either based on the selected<br>API group (for OData v4) or generated using the filter parameters (for OData<br>v2). |
| Entity set | Enter or select the specific entity set you want to retrieve from the<br>service. For more information, see [Addressing Entities](https://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/part2-url-conventions/odata-v4.0-errata03-os-part2-url-conventions-complete.html#_Toc453752340).<br><br>Information noteTip: To visualize all available entity sets, click the<br>[...] button next to the corresponding field to bring<br>out the Retrieve values dialog box, and click<br>Run in background. A new dialog box opens with all<br>the retrieved entity sets you can select. Note that you can also provide a<br>Custom value by selecting the Use custom<br>value checkbox.<br><br>This option impacts the schema of the<br>output flow of this component. It is recommended to update the schema by<br>clicking the Guess schema button after setting the<br>key/value pairs in the table under this option. |
| Specify entity key | Select this checkbox to enter the key used to uniquely identify a specific<br>entity set. For more information, see [Addressing Entities](https://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/part2-url-conventions/odata-v4.0-errata03-os-part2-url-conventions-complete.html#_Toc453752340).<br><br>This option<br>impacts the schema of the output flow of this component. It is recommended to<br>update the schema by clicking the Guess schema button<br>after setting the key/value pairs in the table under this option. |
| Use $filter | Select this checkbox to enter a query that will filter the collection of<br>resources that are addressed by the request URL. For more information, see [System Query Option $filter](https://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/part2-url-conventions/odata-v4.0-errata03-os-part2-url-conventions-complete.html#_Filter_System_Query).<br><br>If both<br>the Use $filter and Use $search<br>options are applied to the same request, the results include only the entities<br>that match both criteria.<br><br>This option impacts the schema of the output<br>flow of this component. It is recommended to update the schema by clicking the<br>Guess schema button after setting the key/value pairs<br>in the table under this option. |
| Use $search | Select this checkbox to enter a query that will be applied to the request<br>URL and will return all matching entities in the collection. For more information,<br>see [System Query Option $search](https://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/part2-url-conventions/odata-v4.0-errata03-os-part2-url-conventions-complete.html#_Toc453752364).<br><br>If both<br>the Use $filter and Use $search<br>options are applied to the same request, the results include only the entities<br>that match both criteria.<br><br>This option impacts the schema of the output<br>flow of this component. It is recommended to update the schema by clicking the<br>Guess schema button after setting the key/value pairs<br>in the table under this option. |
| Use $select | Select this checkbox to enter a query that will be applied to the request<br>URL and will return a specific set of properties for each entity or complex type.<br>For more information, see [System Query Option $select](https://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/part2-url-conventions/odata-v4.0-errata03-os-part2-url-conventions-complete.html#_Toc453752360).<br><br>If both<br>the Use $select and Use $expand<br>options are applied to the same request, the results include only the entities<br>that match the $select criteria, so in that case you should include the $expand<br>criteria in the $select query in order to return all expected<br>properties.<br><br>This option impacts the schema of the output flow of this<br>component. It is recommended to update the schema by clicking the<br>Guess schema button after setting the key/value pairs<br>in the table under this option. |
| Use $expand | Select this checkbox to enter a query that will be applied to the request<br>URL and will return the related expanded resources to be included in line with<br>retrieved resources. For more information, see [System Query Option $expand](https://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/part2-url-conventions/odata-v4.0-errata03-os-part2-url-conventions-complete.html#_Toc453752359).<br><br>If both<br>the Use $select and Use $expand<br>options are applied to the same request, the results include only the entities<br>that match the $select criteria, so in that case you should include the $expand<br>criteria in the $select query in order to return all expected<br>properties.<br><br>This option impacts the schema of the output flow of this<br>component. It is recommended to update the schema by clicking the<br>Guess schema button after setting the key/value pairs<br>in the table under this option. |
| Return type | Select one of the options depending on how you want to parse the data<br>returned by the server.<br><br><ul> <li> <p> <span>Record</span>: Parses the response body and generates                           records (one entity per row).</p> </li> <li> <span>Raw</span>: Returns the full response body in a                           <span>body</span> column as is.</li> </ul> |
| Schema and Edit Schema | A schema is a row description, it defines the number of fields to be<br>processed and passed on to the next component. The schema is either<br>Built-in or stored remotely in the<br>Repository.<br><br><ul> <li> <p> <span>Built-in</span>: You create and store the schema locally                           for this component only. For more information about a component schema in                           its <span>Basic settings</span> tab, see <a href="https://help.qlik.com/talend/r/en-US/8.0/studio-user-guide/basic-settings-tab" target="_blank">Basic settings tab</a>.</p> </li> <li> <p> <span>Repository</span>: You have already                           created the schema and stored it in the <span>Repository</span>. You can reuse it in various projects and Job                           designs. For more information about a component schema in its                              <span>Basic settings</span> tab, see <a href="https://help.qlik.com/talend/r/en-US/8.0/studio-user-guide/basic-settings-tab" target="_blank">Basic settings tab</a>.</p> </li> </ul><br><br>Click Edit<br>schema to make changes to the schema. If the current schema is of the Repository type, three options are available:<br><br><ul> <li> <p> <span>View schema</span>: choose this                option to view the schema only.</p> </li> <li> <p> <span>Change to built-in property</span>:                choose this option to change the schema to <span>Built-in</span> for local changes.</p> </li> <li> <p> <span>Update repository connection</span>:                choose this option to change the schema stored in the repository and decide whether                to propagate the changes to all the Jobs upon completion.</p> <p>If you just want to                propagate the changes to the current Job, you can select <span>No</span> upon completion and choose this schema metadata                again in the <span>Repository Content</span>                window.</p> </li> </ul> |
| Guess schema | Click this button to retrieve the schema according to your settings.<br><br>When<br>retrieving data from OData, you can specify the format and content of the data<br>retrieved using the schema, the Guess schema button, the<br>Entity set option, the, Specify entity<br>key option, the<br>$filter/search/select/expand option, and the<br>Return type option.<br><br>In the dataset's<br>Advanced tab, add a row to the<br>Headers table for each custom HTTP header. Enter the<br>header name in the Name column and its value in the<br>Value column. These headers are sent with the<br>$metadata request during schema discovery. |

## Advanced settings

| Properties | Description |
| --- | --- |
| tStatCatcher Statistics | Select this checkbox to gather the Job processing metadata at a Job level<br>and at each component level. |
| Connection timeout (ms) | Set the timeout period (in milliseconds) for the connector to establish a<br>connection to the server. An error occurs if an attempt to establish a connection<br>fails. |
| Receive timeout (ms) | Set the timeout period (in milliseconds) for receiving response data. An<br>error occurs if no data is received when the read timeout period expires. |
| Headers | Add a row to the Headers table for each custom HTTP<br>header. Enter the header name in the Name column and its<br>value in the Value column. At runtime, the component sends<br>these headers with the $metadata request when the OData version<br>is V2 and Return type is set to<br>Record. |
| Use a proxy | Select this option to use an HTTP or a SOCKS proxy.<br><br><ul> <li> <span>Proxy type</span>: Select the type of proxy you want to use:                           <span>HTTP</span> or <span>SOCKS</span>. The HTTP                        proxy support basic authentication.</li> <li> <span>Proxy host</span> and <span>Proxy port</span>:                        Enter the address and port of the proxy.</li> <li> <span>Proxy login</span> and <span>Proxy                        password</span>: Enter the credentials needed to authenticate to the                        proxy. These two fields are available when <span>HTTP</span> is                        selected from the <span>Proxy type</span> drop-down list.</li> </ul> |
| Use $skip | Select this checkbox to specify the number of items in the queried<br>collection that are to be skipped and not included in the result. For more<br>information, see [System Query Option $top and $skip](https://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/part2-url-conventions/odata-v4.0-errata03-os-part2-url-conventions-complete.html#_Top_and_Skip).<br><br>If<br>both the Use $skip and Use $top<br>options are applied to the same request, the results include only the entities<br>that match both criteria.<br><br>This option impacts the schema of the output<br>flow of this component. It is recommended to update the schema by clicking the<br>Guess schema button after setting the key/value pairs<br>in the table under this option. |
| Use $top | Select this checkbox to specify the number of first items in the queried<br>collection that are to be included in the result. For more information, see [System Query Option $top and $skip](https://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/part2-url-conventions/odata-v4.0-errata03-os-part2-url-conventions-complete.html#_Top_and_Skip).<br><br>If<br>both the Use $skip and Use $top<br>options are applied to the same request, the results include only the entities<br>that match both criteria.<br><br>This option impacts the schema of the output<br>flow of this component. It is recommended to update the schema by clicking the<br>Guess schema button after setting the key/value pairs<br>in the table under this option. |
| Use $orderBy | Select this checkbox to enter a query that will be applied to the request<br>URL and will return the related resources in a particular order. For more<br>information, see [System Query Option $orderby](https://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/part2-url-conventions/odata-v4.0-errata03-os-part2-url-conventions-complete.html#_OrderBy_System_Query).<br><br>This<br>option impacts the schema of the output flow of this component. It is<br>recommended to update the schema by clicking the Guess<br>schema button after setting the key/value pairs in the table<br>under this option. |

## Global Variables

| Variables | Description |
| --- | --- |
| ERROR\_MESSAGE | ERROR\_MESSAGE: the error message generated by the<br>component when an error occurs. This is an After variable and it returns a string. This<br>variable functions only if the Die on error checkbox is<br>cleared, if the component has this checkbox. |
| NB\_LINE | NB\_LINE: the number<br>of rows read by an input component or transferred to an output component. This is an<br>After variable and it returns an integer. |

## Usage

| Usage guidance | Description |
| --- | --- |
| **Usage rule** | This component is usually used as a start component of a Job or subJob and it<br>always needs an output link. |
| **Limitations** | <ul> <li>At runtime, the documented header behavior applies to metadata                           retrieval for OData V2 when <span>Return type</span> is set to                           <span>Record</span>. Do not assume that it applies to other                           return types or requests.</li> <li> <p>For OData v4: the current implementation of this component requires                              the service to support the $count feature.</p> </li> <li> <div>For OData v2:<ul> <li>The @odata.count return value is identical to the current                                       <span>NB_Line</span> variable.</li> <li>Pagination using <span>$skip</span> and                                       <span>$top</span> is supported only when the                                    request does not include a specified key.</li> <li>The <span>Edm.DateTime</span> type is a valid type in OData                                    v2. However, this component uses the Olingo 4 library which is                                    designed for OData v4 and does not support this type. As a                                    result, this type is not supported in the current implementation                                    of this component. Use <span>Edm.DateTimeOffset</span>                                    instead.</li> </ul></div> </li> </ul> |

**Related tasks**

* [Inserting and updating records in an SAP OData dataset](https://help.qlik.com/talend/en-US/components/8.0/sap/tfixedflowinput-tmap-tsapodatainput-tlogrow-tsapodataoutput-inserting-and-updating-records-in-sapodata-dataset-standard-component)