Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] Retrieves data from a table with tRESTRequest and tRESTResponse

Hello everyone,
I would like to create a job that will allow me to extract data from a table based on the value of a parameter passed as input.
For example, I have a table "T_client" with the following fields: code_cli, nom_cli, pren_cli, and I would like to display the table data based on the value of code_cli that is input.
My problem is to be able to:
  - Write the query in the tOracleInput;
  - Set the component tRESTRequest at the "REST API Mapping";
  - And test the job at the endpoint according code_cli that I have input.

I Thank You in advance for your assistance will be greatly appreciated because I'm stuck.
Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi 
tRestResponse returns a document, so I used a tXMLMap to build the document structure. About the HTTP verb, it is just a sample here, you can use the Get method. 

Best regards
Shong

View solution in original post

4 Replies
Anonymous
Not applicable
Author

Hi 
On tRestRequest, define a parameter as shown below:
0683p000009MGaI.png
Then, you are able to define a dynamic query on tOracleInput to select the data that is based on the input value of code_cli, eg;
"select code_cli, nom_cli,pren_cli from table where code_cli="+(Integer)globalMap.get("s.code_cli")
0683p000009MGl4.png
Using a tRestClient to call the rest web service in a Talend job, and pass a value as input parameter.
0683p000009MGl9.png
Hope this gives you hints to finish your job. 
Best regards
Shong
Anonymous
Not applicable
Author

Shong, thank you for your reply

I want to know how did you set the component tXMLMAP_1 and why did you use the POST method for extraction of data? because according to what I read is the GET method is used for extractions.

Thank you to enlighten me.
Anonymous
Not applicable
Author

Hi 
tRestResponse returns a document, so I used a tXMLMap to build the document structure. About the HTTP verb, it is just a sample here, you can use the Get method. 

Best regards
Shong
Anonymous
Not applicable
Author

Shong, thank you for your reply,

Please, can you show me the setting of tXMLMap in a picture as you done it for the tRESTRequest in your first response. It's will greatly help me. (I'm a new user of talend esb open studio)

Best regards