I'm using mysql "select into outfile" to create csv style textfile.
into outfile '/tmp/records.out'
FIELDS TERMINATED BY ',' ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\n'
I've instantiaed opencsv as p = new CSVParser(',', '"', '\\');
Everything is great until the source table has NULLs.
These are encoded as \N without the "enclosed by character" in the csv file.
"varchar\"', simple\\","N","2011-06-06 12:06:38",\N,\N,\N
currently opencsv returns the string 'N' as value for those fields.
Is there already a NULL handling implemented? I couldn't find anything.
How hard would it be to add a special handling (return a null object) for those \N without enclosing chracters?