# Migration to Gatling 3.0.0-RC3. Get a value from a CSV file.

**URL:** <https://community.gatling.io/t/migration-to-gatling-3-0-0-rc3-get-a-value-from-a-csv-file/4562>\
**Category:** Gatling (Open-Source)\
**Created:** [October 10, 2018, 8:51am UTC](https://community.gatling.io/t/migration-to-gatling-3-0-0-rc3-get-a-value-from-a-csv-file/4562 "2018-10-10T08:51:03Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![das](https://avatars.discourse-cdn.com/v4/letter/d/46a35a/32.png) [@das](https://community.gatling.io/u/das)\
**Post date:** [October 10, 2018, 8:51am UTC](https://community.gatling.io/t/migration-to-gatling-3-0-0-rc3-get-a-value-from-a-csv-file/4562/1 "2018-10-10T08:51:03Z")

</div>

Hi,  
Gatling 3.0.0-RC3  
gatling-sbt 3.0.0  
I am migrating to new version of Gatling and I need help with csv feeder.

I have some csv file.  
for example:  
Ssn,CountryCode;  
0111111,NO;

My code when I use feeder look like this(Gatling 2.3.1):

```auto
.feed(data.ShuffleSsn)
.exec(session => {
  val ssn = session.get("Ssn").asOption[String]
  println(s"""SSN: ${ssn.getOrElse("COULD NOT FIND ID: SSN")}""")
  session
})
.exec(new PaymentServiceProvider Reserve("${PaymentId}", "${requestId}",
  ReserveBody("${Ssn}", "${komIdSubject}", "4")))

```

```auto

```

```auto

```

```auto
For gatling 3 I removed "get" frome the session

```

```auto
For gatling 2.3.1 and for gatling-sbt 2.2.2 worked ok. They print "Ssn" number from the file. But for gatling 3 I have problem they print all the time response from println line "SSN: COULD NOT FIND ID: SSN". 
I don't know where is the problem. I am trying to change format of the file, path but nothing helps.

```

```auto

```

```auto
Best Regards

```

```auto
Daniel

```

```auto

```

---

<div class="post-metadata">

**Author:** ![das](https://avatars.discourse-cdn.com/v4/letter/d/46a35a/32.png) [@das](https://community.gatling.io/u/das)\
**Post date:** [October 10, 2018, 8:53am UTC](https://community.gatling.io/t/migration-to-gatling-3-0-0-rc3-get-a-value-from-a-csv-file/4562/2 "2018-10-10T08:53:05Z")

</div>

And also print Reserve: Failed to build request: No attribute named ‘Ssn’ is defined

W dniu środa, 10 października 2018 10:51:03 UTC+2 użytkownik Daniel Safiński napisał:

---

<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:** [October 10, 2018, 8:59am UTC](https://community.gatling.io/t/migration-to-gatling-3-0-0-rc3-get-a-value-from-a-csv-file/4562/3 "2018-10-10T08:59:34Z")

</div>

Please provide an actionable reproducer, eg fork the [https://github.com/gatling/gatling-sbt-plugin-demo](https://github.com/gatling/gatling-sbt-plugin-demo)

Cheers,

---

<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:** [October 10, 2018, 9:08am UTC](https://community.gatling.io/t/migration-to-gatling-3-0-0-rc3-get-a-value-from-a-csv-file/4562/4 "2018-10-10T09:08:18Z")

</div>

Note that your file looks super suspicious:

Ssn,CountryCode;  
0111111,NO;

Why do you mix commas and semicolons???  
I suspect you use semicolon separators, so your file has one single column "Ssn,CountryCode

---

<div class="post-metadata">

**Author:** ![das](https://avatars.discourse-cdn.com/v4/letter/d/46a35a/32.png) [@das](https://community.gatling.io/u/das)\
**Post date:** [October 10, 2018, 11:13am UTC](https://community.gatling.io/t/migration-to-gatling-3-0-0-rc3-get-a-value-from-a-csv-file/4562/5 "2018-10-10T11:13:23Z")

</div>

Hi Stephane,  
Thanks for response.

Why do you mix commas and semicolons???  
Because someone delivered to me this file as csv in this format and I used this in G2.3.2 and it worked ok.  
In gatling3 I tried different formats also only with comma as you mentioned and it doesn’t work.  
example:  
Ssn,CountryCode  
0101,no

Any suggestion?  
W dniu środa, 10 października 2018 11:08:47 UTC+2 użytkownik Stéphane Landelle napisał:

---

<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:** [October 10, 2018, 11:18am UTC](https://community.gatling.io/t/migration-to-gatling-3-0-0-rc3-get-a-value-from-a-csv-file/4562/6 "2018-10-10T11:18:55Z")

</div>

Does your file have a BOM?

---

<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:** [October 10, 2018, 8:36pm UTC](https://community.gatling.io/t/migration-to-gatling-3-0-0-rc3-get-a-value-from-a-csv-file/4562/7 "2018-10-10T20:36:23Z")

</div>

OK, that’s definitively some BOM crap, see [https://github.com/gatling/gatling/issues/3559](https://github.com/gatling/gatling/issues/3559)

---

<div class="post-metadata">

**Author:** ![das](https://avatars.discourse-cdn.com/v4/letter/d/46a35a/32.png) [@das](https://community.gatling.io/u/das)\
**Post date:** [October 11, 2018, 11:32am UTC](https://community.gatling.io/t/migration-to-gatling-3-0-0-rc3-get-a-value-from-a-csv-file/4562/8 "2018-10-11T11:32:06Z")

</div>

Yes, definitely. Yesterday I took csv file from the gatling-sbt-plugin-demo project and pasted my data and feeder loaded properly . Thanks again for help.  
W dniu środa, 10 października 2018 22:36:53 UTC+2 użytkownik Stéphane Landelle napisał:
