I am trying to write output of JDBC feeder in gatling in below fashion but its not working.
def Getdata() = {
val jdbcFeeder1 = jdbcFeeder(dbConnectionString,dbUserName,dbUserPassword,targetQuery)
val outputFilePath = System.getProperty("user.dir") + "/src/gatling/resources/data/createddata.dat"
scenario("Write data To file")
.feed(jdbcFeeder1)
.exec { session =>
val writer1 = new PrintWriter(new FileOutputStream(outputFilePath, true))
writer1.write(session.getAttribute("firstname").as[String] + "\n")
writer1.close();
session
}
}