Hello,
I saw a number of posts describing similar problems, however was not able to fine a solution...
My program receives a tab-separated file from a 3rd party (which I cannot modify) , which sometimes has double-quotes surrounding values.
I've attached a sample file to this email. I'm using CSVREAD to import the file as an H2 database table for further downstream processing.
The problem is that the downstream logic depends on empty strings (including "") being converted to NULL values.
No matter what I try - I'm not able to convert empty strings represented by two double-quotes "" between tabs to NULL values in database table :(
I tried many things including passing ||CHAR(34)||CHAR(34)|| to nullString parameter, but nothing works...
Looks like a bug?
-------
DROP TABLE IF EXISTS sample_table;
CREATE MEMORY TABLE IF NOT EXISTS sample_tab;le
AS SELECT * FROM CSVREAD('sample_tsv_with_double_quotes.csv',null,
'caseSensitiveColumnNames=true charset=UTF-8 nullString="" fieldSeparator= ');
SELECT * FROM sample_table ;
-------
(sample input file is attached)
Any help is appreciated!
Thank You!
Oleg