Page 1 of 1

Convert CSV to Pipe delimited

Posted: Mon Aug 02, 2010 8:19 pm
by kogads
Hi All,

I want to convert the CSV file to Pipe delimited file

Ex:"aaa","bbb",""Wow!!!" this is good","ddd" to
aaa|bbb|"Wow!!!" this is good|ddd

Experts ideas will really help.
Thanks in advance.

Posted: Mon Aug 02, 2010 8:23 pm
by ray.wurlod
Sequential File stage to read (import) the data using comma as the field delimiter (this is a Format property).

Sequential File stage to write (export) the data using pipe as the field delimiter (again on the Format tab).

Voila!

You have already posted about handling of nested quote characters, so I do not propose to revisit that topic.

Posted: Mon Aug 02, 2010 9:22 pm
by chulett
Right, simply read it in with one delimiter and write it back out with the other. Have you tried this? What issues are you having?

Re: Convert CSV to Pipe delimited

Posted: Mon Aug 02, 2010 9:44 pm
by mayur25
kogads wrote:Hi All,

I want to convert the CSV file to Pipe delimited file

Ex:"aaa","bbb",""Wow!!!" this is good","ddd" to
aaa|bbb|"Wow!!!" this is good|ddd

Experts ideas will really help.
Thanks in advance.
If you already have a file Created then you hae to recreate thorugh Datastage Job.
Seq File Stage ---> Copy ----> Seq File Stage.
In the output go to Format Tab and Choose the Delimiter as Pipe.
If you want quote you can use it or else leave it as is.
If you want to handle Null Handling please Assign Null Value which ever you want.

ou shoul dnot face any issue.