ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Database script for inserting 19000+ values

Post new topic  Reply to topic
 Database script for inserting 19000+ values « View previous topic :: View next topic » 
Author Message
hvhora
PostPosted: Tue Jan 02, 2018 5:29 am    Post subject: Database script for inserting 19000+ values Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Tue Jan 02, 2018 6:43 am    Post subject: Re: Database script for inserting 19000+ values Reply with quote

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
View user's profile Send private message
hvhora
PostPosted: Tue Jan 02, 2018 9:26 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Tue Jan 02, 2018 9:51 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Database script for inserting 19000+ values
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.