Support for multiple delimiter characters?

339 views
Skip to first unread message

G^2

unread,
Oct 7, 2012, 11:59:21 AM10/7/12
to bea...@googlegroups.com
Is there anyway to specify more than a single delimiter character in either a CSV or delimited stream?  I have input records using both "," and ":" as delimiter characters...

Thanks for the great work...

Kevin

unread,
Oct 8, 2012, 3:32:44 PM10/8/12
to bea...@googlegroups.com
Hello,

Multiple delimiters are not supported "out of the box", but its not very difficult to implement your own RecordParserFactory/RecordReader for this.  You'd probably want to use the 'delimited' record format and return a String[] from the RecordReader.  Let me know if you need some sample code to get you started, or else there should be some related examples already posted in this forum.

Thanks,
Kevin

Kevin

unread,
Oct 8, 2012, 3:35:26 PM10/8/12
to bea...@googlegroups.com
Found a link that illustrates creating your own RecordReader (but for a different requirement).

G^2

unread,
Oct 10, 2012, 5:29:30 PM10/10/12
to bea...@googlegroups.com
Thanks!
Reply all
Reply to author
Forward
0 new messages