CSV files do not have a way to represent null values, so they automatically
become blank. They're just text files and there is no way that a text file
can distinguish between a blank and a null. I guess we could introduce a
system property or something like that, which could turn all blanks into
null. But I imagine that then you would ask the inverse question about how
to represent blank strings as non-null? :-)

Den tor. 20. sep. 2018 kl. 21.48 skrev Laxmi Lal Menaria <
menarialaxmi...@gmail.com>:

> Hi All,
>
> I am trying to write MSSQL data to csv files and use Apache MetaModel for
> the same, It is working fine for most of the case but failed when I restore
> the csv to Test database.
>
> When I compare the both database I got that BLANK values are migrated to
> NULL values. This should not happens due to data integrity.
>
> I look the metamodel code and found that it is converting the NULL values
> to BLANK
>
> (CsvInsertBuilder)
>
> for(int i = 0; i < stringValues.length; ++i) {
>     stringValues[i] = values[i] == null ? "" : values[i].toString();
> }
>
> So please let me know how can I separate both values NULL and BLANK.
>
> --
>
> Thanks,
> Laxmilal Menaria | +91 982 955 3793 | http://laxmilalmenaria.com/
>

Reply via email to