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 » Custom message format to CSV message format transformation u

Post new topic  Reply to topic Goto page 1, 2  Next
 Custom message format to CSV message format transformation u « View previous topic :: View next topic » 
Author Message
bharathi.tech12
PostPosted: Tue May 14, 2013 6:42 pm    Post subject: Custom message format to CSV message format transformation u Reply with quote

Voyager

Joined: 14 May 2013
Posts: 93

I have message file with custom formatted csv to the actual csv message format with some translations while in mapping.

Ex.
Input csv file
FirstName|LastName|Gender
Rohith|Kumar|Male
Raji|Ram|Female

Output csv file
Name|Gender
Rohith Kumar, 1
Raji Ram,2

Any one can help me to the same in wmb8

thanks in advance.[/u]
Back to top
View user's profile Send private message
smdavies99
PostPosted: Tue May 14, 2013 10:12 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

What you are asking for is a very simple message transfomation.

I guess you have not received any formal training in this large and complex product.

This question has been asked many times before. Search this forum

Look at the samples provided with the product.
Look at how you create a message model because you are going to need that on the way in and out.

Go and try things for yourself. If you have problems then please come back and ask specific questions.
Please don't ask us to do your job for you though.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
bharathi.tech12
PostPosted: Wed May 15, 2013 5:07 am    Post subject: Reply with quote

Voyager

Joined: 14 May 2013
Posts: 93

Thanks for your help.

I tried my flow and explain the same below,

I used the below nodes in my simple project.

1) i have created one Message model which will understand the csv input format and tested as well.it parsed the input csv file into xml nodes and values.
2) i have created the message flow with file input node and file output node. in the file input node i have mapped the input message parsing param with DFDL option and i browsed the my message model.
3) i have used the message map between the file input and output node. Double click the message map node and i have selected the message map in both side. After successfully created the message editor. i have mapped the message mode in one to one.
4)Then i have deployed the flow and tested. I placed my input csv in specified folder path and i got the output file in specified folder path as xml file. but i wand the output file as csv, here what i am missing something.

Exactly I am not aware how to generate the csv output file

Can you help me now.

fyi, i am using the wmb8 trail version of product for my learning.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed May 15, 2013 5:18 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

bharathi.tech12 wrote:
here what i am missing


What did you do to tell WMB that you wanted a flat file in CSV format not XML?

bharathi.tech12 wrote:
fyi, i am using the wmb8 trail version of product for my learning.


As my most worthy associate points out, this is basic stuff and this forum is not the ideal medium for receiveing training. So we tend not to give it. You're much better off seeking formal training, or at least the assistance of a skilled WMB person on your site. This will give you a much better learning experience.
_________________
Honesty is the best policy.
Insanity is the best defence.


Last edited by Vitor on Wed May 15, 2013 6:27 am; edited 1 time in total
Back to top
View user's profile Send private message
bharathi.tech12
PostPosted: Wed May 15, 2013 5:20 am    Post subject: any one can help me Reply with quote

Voyager

Joined: 14 May 2013
Posts: 93

i am tring to get my output as a csv file format. i almost done my application only i am Struggling with my output file.

can any one please help me.




Thanks for your support.
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed May 15, 2013 7:35 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Add two Trace nodes to your message flow. One after the input node, the other after the Mapping node. Set the pattern to ${Root} in both of them.
Put a message through your flow, and compare the outputs from the two Trace nodes. You will see a very obvious difference, and it should answer your question
Back to top
View user's profile Send private message
bharathi.tech12
PostPosted: Wed May 15, 2013 8:02 am    Post subject: Reply with quote

Voyager

Joined: 14 May 2013
Posts: 93

Thanks for your support.

I am not getting the output file in csv format. i am getting the output file as xml format.

Can any one help me how to get my output file content with csv format?

As i mentioned earlied i am using file output note to write my content.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed May 15, 2013 8:13 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

bharathi.tech12 wrote:
Can any one help me how to get my output file content with csv format?


We are helping. You're not listening. Unless what you mean by "help" is "spoon feed me the answer".

bharathi.tech12 wrote:
As i mentioned earlied i am using file output note to write my content.


You did mention that. We probably would have infered it from your claim to be producing a file.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
bharathi.tech12
PostPosted: Wed May 15, 2013 9:25 am    Post subject: Reply with quote

Voyager

Joined: 14 May 2013
Posts: 93

Thanks for your help.
I am not new to the esb world. i have worked with other esb tools. In opensource we have smooks transform tool to for this kind of transformations. i am happy to learn new tech but before going to in deep i need to work out some sample applications. This will help me to ask more details when i am going to attend a training.

If you know any beginner form for WMB, i am happy to go and post my questions. This will help for new to WMB developers.

Sorry if anything wrong.

But still i need you guys support to know more about some basic about this tool.

I also run the CSVApplication sample provided by the WMB. In that sample they used the MQ Input and Output nodes. I changed with File Input and Outpu node. Still the sample application also giving the csv file with xml content.
Back to top
View user's profile Send private message
bharathi.tech12
PostPosted: Wed May 15, 2013 10:30 am    Post subject: Reply with quote

Voyager

Joined: 14 May 2013
Posts: 93

kimbert wrote:
Add two Trace nodes to your message flow. One after the input node, the other after the Mapping node. Set the pattern to ${Root} in both of them.
Put a message through your flow, and compare the outputs from the two Trace nodes. You will see a very obvious difference, and it should answer your question


As per your suggestions, i have placed the 2 trace nodes. Trace 1 is out terminal of File input node and Trace 2 is out terminal of Map node. Trace 1 giving the the csv file content and the trace 2 giving the xml content.

Can you help me
Back to top
View user's profile Send private message
bharathi.tech12
PostPosted: Wed May 15, 2013 10:33 am    Post subject: Reply with quote

Voyager

Joined: 14 May 2013
Posts: 93

Vitor wrote:
bharathi.tech12 wrote:
Can any one help me how to get my output file content with csv format?


We are helping. You're not listening. Unless what you mean by "help" is "spoon feed me the answer".

bharathi.tech12 wrote:
As i mentioned earlied i am using file output note to write my content.


You did mention that. We probably would have infered it from your claim to be producing a file.


i am not asking the complete workspace or the project. i have implemented the project but its not giving what i am expecting.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed May 15, 2013 11:14 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

bharathi.tech12 wrote:
kimbert wrote:
Add two Trace nodes to your message flow. One after the input node, the other after the Mapping node. Set the pattern to ${Root} in both of them.
Put a message through your flow, and compare the outputs from the two Trace nodes. You will see a very obvious difference, and it should answer your question


As per your suggestions, i have placed the 2 trace nodes. Trace 1 is out terminal of File input node and Trace 2 is out terminal of Map node. Trace 1 giving the the csv file content and the trace 2 giving the xml content.


I think @kimbert meant a slightly less obvious difference, this one being apparent without the use of Trace nodes.

bharathi.tech12 wrote:
its not giving what i am expecting


This comes back to my first question - what have you done / set / configured to indicate to broker you want a CSV file not an XML one? Or to pose the question another way, what in the Trace node output explains why WMB has chosen to output XML? If the answer to the first is "nothing" I've found your problem. The answer to the second is what you need to do in answer to the first.

And remember - we can't see your code. We can't say "click this" or "set that". We can only tell you what to look for and where.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
bharathi.tech12
PostPosted: Wed May 15, 2013 11:47 am    Post subject: Reply with quote

Voyager

Joined: 14 May 2013
Posts: 93

Thanks for your support.

I have created the Message model (DFDL model) for both input csv and output csv format. In the message map i have selected the input csv model as my input and out csv model as my output. In the mapping i have moved or concat the input field to output field.

If you wand i can share my application. Let me know how you want me to share the application.

[/img]
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed May 15, 2013 11:52 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

bharathi.tech12 wrote:
In the message map i have selected the input csv model as my input and out csv model as my output.


Okay, this is not strictly true. You've selected the input logical model and output logical model but neither (by the time you get to map them) have any connection with their original physical format.

You've clearly done something to have the input recognized as a flat csv file and not as an XML document. What corresponding steps have you taken to have the output identified as a flat csv file?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
bharathi.tech12
PostPosted: Wed May 15, 2013 12:06 pm    Post subject: Reply with quote

Voyager

Joined: 14 May 2013
Posts: 93

Thanks for your support.

Yes, i am using logical models. the input model able to understand the csv file input and the mapping node generating the output using the output logical model.

I am passing my csv file as mentioned earlier in this post.

Input csv file
FirstName|LastName|Gender
Rohith|Kumar|Male
Raji|Ram|Female

I am only using the FileInput Node, MSLMapping Node and FileOutput Node.

But right now i am getting the output file like below,

<messageOut>
<record>
<field1>Bharathi Subramanian </field1>
<field2>2</field2>
</record>
<record>
<field1>Madu Kumar </field1>
<field2>2</field2>
</record>
</messageOut>

What i am expecting in the file is

Output csv file
Name|Gender
Rohith Kumar, 1
Raji Ram,2

please help me, what i need to conf/set in my message flow.[/u][/b][/url]
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Custom message format to CSV message format transformation u
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.