|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Database script for inserting 19000+ values |
« View previous topic :: View next topic » |
Author |
Message
|
hvhora |
Posted: Tue Jan 02, 2018 5:29 am Post subject: Database script for inserting 19000+ values |
|
|
Newbie
Joined: 09 Aug 2017 Posts: 6
|
Hi,
I need to build database that will have 19000 + entries. I will have let's say a text file having a policy number and the flag value. I will have database table created with two columns as mentioned. I need to build message flow that will read these 19K distinct values from a file and insert into database. I imagine it will be a database script? I would really appreciate if someone can help with sample code. I am still new to IIB |
|
Back to top |
|
 |
Vitor |
Posted: Tue Jan 02, 2018 6:43 am Post subject: Re: Database script for inserting 19000+ values |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
hvhora wrote: |
I imagine it will be a database script? |
Why do you imagine that? You could use a database script or a message flow, and the choice between the 2 probably hinges on how often you perform this exercise (TCOE between the 2 methods).
But a flow would do this without recourse to any other external component. As to "sample code", I don't think you need any; you need a FileInput node and a Mapping node. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
hvhora |
Posted: Tue Jan 02, 2018 9:26 am Post subject: |
|
|
Newbie
Joined: 09 Aug 2017 Posts: 6
|
Hi Victor. Thank you for your response.
I did not understand. Fileinput node and the mapping node to insert into database. Can I just place the 19000 entries between xml tags and run for loop to insert all into database. If there is a simple way, can you please explain a little bit more on how do I proceed. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Jan 02, 2018 9:51 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
hvhora wrote: |
Can I just place the 19000 entries between xml tags |
The FileInput node reads more than XML. So have it read the file as is.
hvhora wrote: |
and run for loop to insert all into database. |
You likewise don't need a loop.
hvhora wrote: |
If there is a simple way |
There is
hvhora wrote: |
can you please explain a little bit more on how do I proceed. |
You write a flow with a FileInput node and a Mapping node. The only other steps I omitted were a DFDL model for the file and a map for the insert.
If you can't work out how to do that, use a database script. For everything. Because that's about as simple as a flow gets and if this is beyond you, you should use never try and use broker again. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|