# Getting variable from feeder and setting to Session

**URL:** <https://community.gatling.io/t/getting-variable-from-feeder-and-setting-to-session/5108>\
**Category:** Gatling (Open-Source)\
**Created:** [July 4, 2019, 8:10am UTC](https://community.gatling.io/t/getting-variable-from-feeder-and-setting-to-session/5108 "2019-07-04T08:10:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shazad\_Dad](https://avatars.discourse-cdn.com/v4/letter/s/ecd19e/32.png) [@Shazad\_Dad](https://community.gatling.io/u/Shazad_Dad)\
**Post date:** [July 4, 2019, 8:10am UTC](https://community.gatling.io/t/getting-variable-from-feeder-and-setting-to-session/5108/1 "2019-07-04T08:10:59Z")

</div>

im trying to use a feeder to set a attribute to session

This is a config file, the test uses this file to setup up variables that will be used in the test.

private val csvFeeder = csv(“simulations\CommPayPerfTest\Data\ConfigSettings.csv”)

def configureSession(session: Session) = {

feed(csvFeeder)

.exec(session =\> {  
val EntityId = session(“EntityId”).as[String]

session  
})

session.set(“DealerGroupId”, DealerGroupId)  
.set(“SiteCode”, SiteCode)  
.set(“EntityId”, (session(“EntityId”).as [String]))

}

in running it fails with “no attribute with EntitiyId is defined”

any ideas what im doing wrong?
