Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
Keep in mind that I`m a super beginner. So feel free to let me know if any part of my process could be done differently as well.
I have a file with a list of endpoints and filenames (highlighted), and I`m using the tRest to go over all the Endpoints, download a list of JSON files, and output each file as a JSON file.
My problem is that my filename comes from the input file, and I have no idea how to bring this information to the tRest output.
I looked everywhere and saw some posts talking about using a tmap, but couldn`t grasp the idea. My tRest response has only the body and nothing else.
Thank you.
Best,
Fernando
If you read the endpoints and filenames from the file and use a tFlowToterate to iterate each row, you can access the current row using the following expression:
rowNumber.columnName
eg:
tFileInputDelimited--main(row1)--tFlowToIterate--tRest--main--tFileOutputDelimited
on tRest, you can set a dynamic URL:
"host/"+row1.Endpoint
on tFileOutputDelimited, set a dynamic Output file path:
"D:\path\"+row1.Output+".json"
Hello
Where do you extract the endpoints? from a file with filename?
Can you explain how endpoint and filename are related? That is, which filename should be used for the current endpoint's output?
Regards
Shicong
Hi,
The highlighted input file looks like this:
I`m using this file to manage all endpoints and also to have all filenames (Output). All endpoints return a JSON and I want to save each JSON to a different file.
Best,
Fernando Vizcaino
If you read the endpoints and filenames from the file and use a tFlowToterate to iterate each row, you can access the current row using the following expression:
rowNumber.columnName
eg:
tFileInputDelimited--main(row1)--tFlowToIterate--tRest--main--tFileOutputDelimited
on tRest, you can set a dynamic URL:
"host/"+row1.Endpoint
on tFileOutputDelimited, set a dynamic Output file path:
"D:\path\"+row1.Output+".json"
Thank you!!
While I was waiting for a reply, I developed another solution and you wouldn`t believe the number of components I used for that. 😂
Only so I can understand clearly these variables from the FlowToIterate. I can use them wherever I want downstream after the Flowtoiterate, right? Even if I turn on the parallel execution?
Best,
Fernando Vizcaino