Gatling- How to insert the datas into db.

698 views
Skip to first unread message

Mohanapriya Anandakumar

unread,
Jan 29, 2015, 5:40:13 AM1/29/15
to gat...@googlegroups.com
how to insert the datas into db from excel sheet using scala file.



Thanks,
Mohanapriya

Abhinav Gogna

unread,
Jan 29, 2015, 9:13:10 AM1/29/15
to gat...@googlegroups.com
How is this relevant in a gatlling forum?

Mohanapriya Anandakumar

unread,
Jan 30, 2015, 12:54:05 AM1/30/15
to gat...@googlegroups.com
I have the recorded scala file. I want to insert the data's into db from excel sheet using jdbc feeder.can anyone help how to achieve this.
'

Pierre DAL-PRA

unread,
Jan 30, 2015, 2:13:39 AM1/30/15
to gat...@googlegroups.com
The JDBC feeder fetches data from the database, not write to it.
Gatling won’t help you much for that…

Small tip: export your Excel sheet to a CSV file, then read your CSV file to get all the records you’ll need to insert in the database, then insert them using plain JDBC.
You’ll find plenty of resources on how to achieve that on Google/StackOverflow.

Cheers,

Pierre 

--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

mohana priya

unread,
Jan 30, 2015, 2:15:49 AM1/30/15
to gat...@googlegroups.com
can you give some examples how to do this? I am new to gatling



Have A Smile Always,
Mohanapriya Anandakumar



--
You received this message because you are subscribed to a topic in the Google Groups "Gatling User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gatling/FkEit7oF4sk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gatling+u...@googlegroups.com.

mohana priya

unread,
Jan 30, 2015, 2:21:58 AM1/30/15
to gat...@googlegroups.com
I am able to insert the datas manually. 

val testData2 = jdbcFeeder("jdbc:oracle:thin:@10.87.54.8:1521:wahipaD", "myHPHB_MI_SYSTS", "myHPHB_MI_SYST", """insert into TRN_USER_ACCOUNT(USER_ACCT_SID,LOGIN_ID,PWD,ACNT_TYPE_LKPCD,TENANT_CID,OPRTNL_FLAG,CREATED_BY,CREATED_DATE,MODIFIED_BY,MODIFIED_DATE) VALUES (2525,'user2','pwd','NORMAL',26,'A','1',sysdate,1026,sysdate)""")

As you said , first i need to export my excel sheet using csv file. I have done this. then how to read csv file and how to insert into db. I got struck with this. please help.

PFA

Thanks ,
Mohanpriya



Have A Smile Always,
Mohanapriya Anandakumar



On Fri, Jan 30, 2015 at 12:43 PM, Pierre DAL-PRA <dalpra...@gmail.com> wrote:

--
You received this message because you are subscribed to a topic in the Google Groups "Gatling User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gatling/FkEit7oF4sk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gatling+u...@googlegroups.com.
jdbc feeder error.PNG

Pierre DAL-PRA

unread,
Jan 30, 2015, 2:29:06 AM1/30/15
to gat...@googlegroups.com
This has absolutely nothing to do with Gatling here…
This kind of task could be achieved with any tool or programming language of your liking.
Again, you’ll find plenty of resources on how to do that anywhere on the Web.

Please remember this is the Gatling mailing list, not StackOverflow.
We’ll be glad to help you develop your Gatling simulations but here, but the means to setup your test environment has really nothing to do with Gatling itself.

Cheers,

Pierre
Reply all
Reply to author
Forward
0 new messages