Reputation: 39
In Jmeter, I have fetched data using 'CSV data set config. Now I got stuck how these data can be passed to Mysql database using JDBC request. I have added a query
'INSERT INTO rawdata_bk (data) VALUES ($data)'. But I am getting error like "Unknown column '$data' in 'field list'" So my question is how can i Pass the data from csv file to database row by row
Upvotes: 1
Views: 3961
Reputation: 168072
JMeter Variables have slightly different syntax, you need to refer them as:
${data}
- direct reference${__V(data)}
- via __V() function Full query will look like: INSERT INTO rawdata_bk (data) VALUES (${data})
If you will need to check ${data}
variable value it can be done via Debug Sampler and View Results Tree Listener combination, see How to Debug your Apache JMeter Script article for details.
Upvotes: 1