0

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 Answers1

0

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

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • I have the same configuration but actually what I want is, for the first iteration "csv data set config" should pick the row which has DATE column value ranging from 1-1-2000 to 1-1-2010.[note: the csv files date column has values ranging from 1-1-1950 to 1-1-2022]. So if my first row has date as 1-1-1970 then csv data config should not return that row instead it should check for the next row which has date from 1-1-2000 to 1-1-2010 – Ajantha Hebbar Mar 14 '23 at 05:46