Author |
Message
|
krypton |
Posted: Sun Mar 14, 2010 7:14 am Post subject: How to write CSV file using FileOutput Node |
|
|
 Disciple
Joined: 14 Mar 2010 Posts: 186
|
Hello Guys,
I am retrieving data from a Oracle database using JDBC connection in a JavaCompute Node. The data is in the below format,
Now, my objective is to write a csv file in the output, how can I conver the above data in CSV format as its very large. I am planning to use a FileOutput Node once I have the data in the desired format.
Any Suggestions?
Cheers!
Krypton |
|
Back to top |
|
 |
krypton |
Posted: Sun Mar 14, 2010 7:19 am Post subject: |
|
|
 Disciple
Joined: 14 Mar 2010 Posts: 186
|
OMG!! I posted this topic on a wrong forum. Moderators, please help me to move this question to the correct form(Message Broker).
My mistake, and apology for the same.
Regards, _________________ Dreams are not something which you watch when you are asleep,it is something which doesn't let you sleep. |
|
Back to top |
|
 |
Vitor |
Posted: Sun Mar 14, 2010 4:38 pm Post subject: Re: How to write CSV file using FileOutput Node |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
krypton wrote: |
Now, my objective is to write a csv file in the output, how can I conver the above data in CSV format as its very large. |
Use a message set to describe the file format, populate it with the data and write it with the FileOutput node?
On the face of this it's a very simple thing, so what have you tried and what happened? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Rahul999 |
Posted: Sun Mar 14, 2010 5:24 pm Post subject: |
|
|
 Centurion
Joined: 14 Mar 2007 Posts: 134
|
Hi Both,
Even I am having the similar issue. In my case I dont know how many fields I have to finally send to the output, so I can not come with a message set.
Regards, _________________ "For all your days be prepared, and meet them ever alike.
When you are the anvil, bear - when you are the hammer, strike."
- Edwin Markham |
|
Back to top |
|
 |
Vitor |
Posted: Sun Mar 14, 2010 5:29 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Rahul999 wrote: |
I create a message set I need to come up a message set with thousand of fields, that doesn't seem a practical approach. |
So are you getting treatment for the multiple personality disorder?
If all you're trying to create is a simple CSV with an unknown number of items, then what's with a message set with a single field that repeats an unbounded number of times?
If you're trying to create a CSV with an unknown number of "tag,value" pairs, say so and then tell us how you know the value of "tag" for a given value. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Mar 15, 2010 2:39 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Oddly enough, broker comes with sample message sets for CSV files that handle both cases. |
|
Back to top |
|
 |
kimbert |
Posted: Mon Mar 15, 2010 5:54 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
krypton: Please post a proper example of your data format. The example that you posted contains one number per line and nothing else. Describe how each line is identified, and what the line feed character is. If there is a header and/or a trailer record, please describe them as well.
Have you looked at the CSV sample in the Samples Gallery? |
|
Back to top |
|
 |
krypton |
Posted: Tue Mar 16, 2010 8:29 pm Post subject: |
|
|
 Disciple
Joined: 14 Mar 2010 Posts: 186
|
kimbert wote:
Quote: |
Have you looked at the CSV sample in the Samples Gallery? |
mqjeff wrote:
Quote: |
Oddly enough, broker comes with sample message sets for CSV files that handle both cases. |
Thanks Both, I figured it out after going through the samples provided with Message Broker. Should have looked there earlier, sorry for being so inconvenience.
Regards, _________________ Dreams are not something which you watch when you are asleep,it is something which doesn't let you sleep. |
|
Back to top |
|
 |
|