# Multiple CSV Feeder

**URL:** <https://community.gatling.io/t/multiple-csv-feeder/925>\
**Category:** Gatling (Open-Source)\
**Created:** [April 3, 2014, 10:07pm UTC](https://community.gatling.io/t/multiple-csv-feeder/925 "2014-04-03T22:07:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nilesh\_Shah](https://avatars.discourse-cdn.com/v4/letter/n/e95f7d/32.png) [@Nilesh\_Shah](https://community.gatling.io/u/Nilesh_Shah)\
**Post date:** [April 3, 2014, 10:07pm UTC](https://community.gatling.io/t/multiple-csv-feeder/925/1 "2014-04-03T22:07:05Z")

</div>

Hi there,

How do I use more than one feeder for single scenario?

I’m trying to follow example similar to here [[https://github.com/excilys/gatling/wiki/Feeders#what](https://github.com/excilys/gatling/wiki/Feeders#what)] to use multiple CSV files. But it’s not working for me… But exec can’t find field from classesFeed… I’m using 2.0.0-M2.

17:33:39.546 [ERROR] i.g.h.a.HttpRequestAction - No attribute named ‘fieldFromClass’ is defined

val teachersFeed = csv(“teachers.csv”)  
val classesFeed = csv(“classes.csv”)

val scn = {  
scenario(“Create Class”)  
.feed(teachersFeed)  
.repeat(1) {  
feed(classesFeed)  
.exec(  
createClass("${fieldFromTeacher}","${fieldFromClass}")  
)  
}  
}

Thanks,  
Nilesh

---

<div class="post-metadata">

**Author:** ![Spencer\_Chastain](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@Spencer\_Chastain](https://community.gatling.io/u/Spencer_Chastain)\
**Post date:** [April 4, 2014, 1:56am UTC](https://community.gatling.io/t/multiple-csv-feeder/925/2 "2014-04-04T01:56:21Z")

</div>

Is the first line of your CSVs the names of the columns?

e.g.:  
fieldFromClass,secondFieldFromClass  
foo,bar  
baz,zed  
etc,…

---

<div class="post-metadata">

**Author:** ![Nilesh\_Shah](https://avatars.discourse-cdn.com/v4/letter/n/e95f7d/32.png) [@Nilesh\_Shah](https://community.gatling.io/u/Nilesh_Shah)\
**Post date:** [April 4, 2014, 2:25pm UTC](https://community.gatling.io/t/multiple-csv-feeder/925/3 "2014-04-04T14:25:26Z")

</div>

yes, field names are on first line… Works file with only file…

---

<div class="post-metadata">

**Author:** ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)\
**Post date:** [April 4, 2014, 2:27pm UTC](https://community.gatling.io/t/multiple-csv-feeder/925/4 "2014-04-04T14:27:46Z")

</div>

My2cents: you have trailing/heading spaces in your header names.

fieldFromClass,secondFieldFromClass // good

fieldFromClass ,secondFieldFromClass // bad

fieldFromClass,secondFieldFromClass ← trailing space, bad

---

<div class="post-metadata">

**Author:** ![Nilesh\_Shah](https://avatars.discourse-cdn.com/v4/letter/n/e95f7d/32.png) [@Nilesh\_Shah](https://community.gatling.io/u/Nilesh_Shah)\
**Post date:** [April 4, 2014, 2:28pm UTC](https://community.gatling.io/t/multiple-csv-feeder/925/5 "2014-04-04T14:28:21Z")

</div>

found the issue… Had extra spaces in second file… Thanks…
