# Multiple records from same CSV feeder

**URL:** <https://community.gatling.io/t/multiple-records-from-same-csv-feeder/5241>\
**Category:** Gatling (Open-Source)\
**Created:** [September 13, 2019, 12:20pm UTC](https://community.gatling.io/t/multiple-records-from-same-csv-feeder/5241 "2019-09-13T12:20:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ali\_Hussain\_Hashmi](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@Ali\_Hussain\_Hashmi](https://community.gatling.io/u/Ali_Hussain_Hashmi)\
**Post date:** [September 13, 2019, 12:20pm UTC](https://community.gatling.io/t/multiple-records-from-same-csv-feeder/5241/1 "2019-09-13T12:20:48Z")

</div>

Hey Everyone,

I am using Gatling 3. I have a csv feeder with just one column titled “accountIds”. I need to pass more than one random records from the feeder in the body of my POST request. I do it like this:

```auto
val searchFeeder = csv("data/accountids.csv").random

val scn1 = scenario("Scenario 1") // A scenario is a chain of requests and pauses
  .feed(searchFeeder,2)
  .exec(http("Search")
    .post("/v3/accounts/location/search")
    .body(StringBody("""{"accountIds": ["${accountIds}"]}""")).asJson)

setUp(scn1.inject(atOnceUsers(10)).protocols(httpConf))

```

I get the error:

Failed to build request: No attribute named ‘accountId s’ is defined

This works fine if I remove the 2 from the feed function and use just one argument in .feed(searchFeeder).

Thank you for the help

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [September 13, 2019, 12:23pm UTC](https://community.gatling.io/t/multiple-records-from-same-csv-feeder/5241/2 "2019-09-13T12:23:44Z")

</div>

Failed to build request: No attribute named ‘accountId s’ is defined

It looks like you have copy pasted a non printable character between the ‘d’ and the ‘s’ characters in your Gatling expression.

---

<div class="post-metadata">

**Author:** ![Ali\_Hussain\_Hashmi](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@Ali\_Hussain\_Hashmi](https://community.gatling.io/u/Ali_Hussain_Hashmi)\
**Post date:** [September 13, 2019, 12:32pm UTC](https://community.gatling.io/t/multiple-records-from-same-csv-feeder/5241/3 "2019-09-13T12:32:27Z")

</div>

That might be a typo from my end. I changed the column header of the file to accounts. I still get the same error:

> Search: Failed to build request: No attribute named ‘accounts’  
> is defined

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [September 13, 2019, 12:37pm UTC](https://community.gatling.io/t/multiple-records-from-same-csv-feeder/5241/4 "2019-09-13T12:37:20Z")

</div>

No, that’s not the same error.

Search: Failed to build request: No attribute named ‘accounts’

---

<div class="post-metadata">

**Author:** ![Ali\_Hussain\_Hashmi](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@Ali\_Hussain\_Hashmi](https://community.gatling.io/u/Ali_Hussain_Hashmi)\
**Post date:** [September 13, 2019, 12:43pm UTC](https://community.gatling.io/t/multiple-records-from-same-csv-feeder/5241/5 "2019-09-13T12:43:55Z")

</div>

Yes but I changed the column header of my csv file to ‘accounts’. This is the change:

```auto
val scn1 = scenario("Scenario 1")
  .feed(searchFeeder,2)
  .exec(http("Search")
    .post("/v3/accounts/location/search")
    .body(StringBody("""{"accountIds": ["${accounts}"]}""")).asJson)

```

This works perfectly well if I remove the 2 from the feed function.

---

<div class="post-metadata">

**Author:** ![Ali\_Hussain\_Hashmi](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@Ali\_Hussain\_Hashmi](https://community.gatling.io/u/Ali_Hussain_Hashmi)\
**Post date:** [September 13, 2019, 1:20pm UTC](https://community.gatling.io/t/multiple-records-from-same-csv-feeder/5241/6 "2019-09-13T13:20:53Z")

</div>

Also, I have tried it with feeders other than csv. The error remains.

Thank you for the help.

---

<div class="post-metadata">

**Author:** ![vu.nguyen](https://avatars.discourse-cdn.com/v4/letter/v/ba9def/32.png) [@vu.nguyen](https://community.gatling.io/u/vu.nguyen)\
**Post date:** [September 13, 2019, 8:47pm UTC](https://community.gatling.io/t/multiple-records-from-same-csv-feeder/5241/7 "2019-09-13T20:47:41Z")

</div>

Should it be “${accounts1}” and “${accounts2}”?[https://gatling.io/docs/current/session/feeder](https://gatling.io/docs/current/session/feeder)
