Get value of session attribute and using it for feeder file path

Hi… I am totally new to gatling and I am struggling with the below problem. I have checked other answers related to this but I was not able to get solution for my problem

sheet.csv has the path to the file that I will be using in my json feeder (marked in yellow). As I am using feed(locFeeder), file value will be in session and I wanted to use this value that is in session as file path to my feeder. I know that as per documentation, “${file}” will be considered as is but not session attribute for the json feeder.

So I am looking for a way to retrieve the value of the file session attribute and give it to the jsonFeeder. Request you to help me with this-- thanks

val locFeeder = csv(“sheet.csv”)

val dataload = feed(locFeeder).repeat(10){

feed(jsonFile("${file}")).exec(http(“Call”).post(“some/url”).body(ELFileBody(“message.json”)).asJSON)

}

Sample sheet.csv

file
/data/doc1.json
/data/doc2.json

Thanks,
kartheek.

No possible amt. Feeders are potentially heavy to parse, so built-in implementations only take static paths so they can be parsed on start up, not on the fly during the simulation like you suggest.
Then, you can write your own implementation. In the end, Feeders are just Iterators.