How to read the rows from csv file based on the column value in jmeter

124 Views Asked by At

What I'm trying to do: I have a csv file and it has around 1k rows, for each thread I need to read the CSV file rows based on the column value to populate the database. The csv file contains "Date" as a column and I need to get the rows based on that value. For example I need to populate the database with the data generated from 1-1-2000 to 1-1-2010 so I should get the CSV row which have date column's value between 1-1-2000 to 1-1-2010.

1

There are 1 best solutions below

1
Dmitri T On

If you configured you CSV Data Set Config like this:

enter image description here

Pay attention to Ignore first line setting

You will be able to refer the values from the "Date" column as ${Date} where required.

With the above setting each thread (virtual user) will read next line on each iteration, if you want to amend this behaviour - you can choose different Sharing Mode