Handling New Line within a column while reading
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 376
- Joined: Sat Jan 07, 2012 12:25 pm
- Location: Piscataway
Handling New Line within a column while reading
Hi All,
My source is a .csv file in the following format
"col1","col2","col3","col4"
"1","2","3\n2","4"
"2","2","3\n2","4"
As you can see, col3 has a new line withiin it. When I try reading this file using sequential file stage, it isn't able to read the entire line since it finds a new line before the actual end of the record.
Can someone please help me with this issue?
Thanks in advance
My source is a .csv file in the following format
"col1","col2","col3","col4"
"1","2","3\n2","4"
"2","2","3\n2","4"
As you can see, col3 has a new line withiin it. When I try reading this file using sequential file stage, it isn't able to read the entire line since it finds a new line before the actual end of the record.
Can someone please help me with this issue?
Thanks in advance
Jerome
Data Integration Consultant at AWS
Connect With Me On LinkedIn
Life is really simple, but we insist on making it complicated.
Data Integration Consultant at AWS
Connect With Me On LinkedIn
Life is really simple, but we insist on making it complicated.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Premium Member
- Posts: 376
- Joined: Sat Jan 07, 2012 12:25 pm
- Location: Piscataway
Thank you Ray. But looks like I cannot select the server sequential stage in my parallel job. Either it has been disabled or I am missing something. Your advice would be much appreciated.
Jerome
Data Integration Consultant at AWS
Connect With Me On LinkedIn
Life is really simple, but we insist on making it complicated.
Data Integration Consultant at AWS
Connect With Me On LinkedIn
Life is really simple, but we insist on making it complicated.
-
- Premium Member
- Posts: 376
- Joined: Sat Jan 07, 2012 12:25 pm
- Location: Piscataway
My bad! Thank you.
Besides this, are there no other alternatives solely using parallel stages?
Besides this, are there no other alternatives solely using parallel stages?
Jerome
Data Integration Consultant at AWS
Connect With Me On LinkedIn
Life is really simple, but we insist on making it complicated.
Data Integration Consultant at AWS
Connect With Me On LinkedIn
Life is really simple, but we insist on making it complicated.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Read what I wrote again, carefully.jerome_rajan wrote:But looks like I cannot select the server sequential stage in my parallel job. Either it has been disabled or I am missing something. Your advice would be much appreciated.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
you can try some other way using filter command in seq file stage ..
such as:
But make sure that, your \n at the end should not be removed.
Thanks
such as:
Code: Select all
tr -d "\n"
Thanks
pandeeswaran
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: