Hi
I have a row with data as follows
abc|xyz|a,b,c,d|123
I need the demiter comma to be replaced by Pipe as follows
abc|xyz|a|b|c|d|123 :D
Conversion of any delimited row to Pipe delimited
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 12
- Joined: Fri Apr 12, 2013 7:12 am
-
- Premium Member
- Posts: 536
- Joined: Thu Oct 11, 2007 1:48 am
- Location: Bangalore
Hi,
If your source is sequential file,it can be done in different methods:-
Method 1:-
Read seq. file as a single string and apply convert function in transformer.
Convert(",","|",InputLink.Col)
Method2:-
In the input sequential file stage,write below sed command at Option->Filter
sed '1,$s/,/|/g'
If your source is sequential file,it can be done in different methods:-
Method 1:-
Read seq. file as a single string and apply convert function in transformer.
Convert(",","|",InputLink.Col)
Method2:-
In the input sequential file stage,write below sed command at Option->Filter
sed '1,$s/,/|/g'
Thanks
Prasoon
ETL Consultant
LinkedIn :- http://www.linkedin.com/profile/view?id ... ab_pro_top
Blog:- http://dsshar.blogspot.com/
Prasoon
ETL Consultant
LinkedIn :- http://www.linkedin.com/profile/view?id ... ab_pro_top
Blog:- http://dsshar.blogspot.com/
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: