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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
kakooo16
Creator
Creator

Create different file after javaRow (one row - one file ) after tRESTClient responses

Hello , i want to create a tfileOutputRaw after each api call to store the response in the file

here is my job design :

0695b00000L0NPXAA3.png 

I thought that when in my file name i just put TalendDate.getDate("yyyy-MM-dd-HHmmss") to get different files with each api response but the problem is that i get only the last api response

How to get different files for each api response .

Labels (2)
1 Reply
Anonymous
Not applicable

Hi @not specified not specified​,

 

I think you may be nearly there with this. Try placing a tFlowToIterate between the tJavaRow and the tRestClient. The instructions for the tFlowToIterate are here: https://help.talend.com/r/en-US/7.3/orchestration/tflowtoiterate

 

Then after the tFlowToIterate, connect a tIterateToFlow. The instructions are found here: https://help.talend.com/r/en-US/7.3/orchestration/titeratetoflow

 

In the tIterateToFlow component you will need to recreate each of the columns that are fed to the tFlowToIterate. So if your tJavaRow outputs 3 columns called....

 

"Column1"

"Column2"

"Column3"

 

.... you will need to recreate those in tIterateToFlow and populate the columns with the values that are temporarily stored in the globalMap by the tFlowToIterate. If they are all Strings, the columns in the tIterateToFlow will look something like this....

 

((String)globalMap.get("row13.Column1"))

((String)globalMap.get("row13.Column2"))

((String)globalMap.get("row13.Column3"))

 

Notice the format of the globalMap.get "key". It is the name of the row feeding the tFlowToIterate, a full stop and the name of the column. The globalMap get requests must be cast to the type of column.