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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
AKumar1595005090
Contributor
Contributor

How to generate a new file for each request.

I am requesting data from trestclient i am providing 5 different date dynamically in URL and hitting the trestclient. so my requirement is, in every iterate file should be different based on requested date.

for example:-

i am requesting the URL for date 05-2020

file should be "aaa_05_2020.json"

and then  again i am requesting the URL for date 06-2020

file should be "aaa_06_2020.json"

like so on i am requesting for 12 different date

when i am running the job it is making one file and merging all the data in same file.

please help

i am requesting like this "URL &month="+ i.toString() +"&year="+(String) globalMap.get("process_year"));"

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi

The output file path should be dynamic based on the current date value, something like:

"D:/file/aaa_"+i.toString()+"_"+(String) globalMap.get("process_year"))+".json"

 

Regards

Shong

View solution in original post

5 Replies
Anonymous
Not applicable

Hi

The output file path should be dynamic based on the current date value, something like:

"D:/file/aaa_"+i.toString()+"_"+(String) globalMap.get("process_year"))+".json"

 

Regards

Shong

AKumar1595005090
Contributor
Contributor
Author

Hi

 

i already built the above mentioned logic but not working.

 

See : ""C:/API/aa/"+(String) globalMap.get("OPUName")+"/"+(String) globalMap.get("LocationName")+"/"+(String) globalMap.get("process_year")+"/"+(Integer) globalMap.get("process_month")+"/"+(Integer) globalMap.get("process_day")+"/" +(Long)globalMap.get("epoch") + "_" +(Integer) globalMap.get("process_month")+ "_" + (String) globalMap.get("process_year") + ".json"

 

 

Anonymous
Not applicable

what is the problem now? You are getting null value from the global variable? For testing, print the value of path on a tJava to see if you get the expected value.

AKumar1595005090
Contributor
Contributor
Author

Now this issue got resolved. Thanks for your Support

Anonymous
Not applicable

Great, thanks for your feedback!