This project is read-only.

CSV files with empty values

May 2, 2014 at 10:30 AM
Hi,

Columns in CSV files are ignored if the value is empty. This CSV file:
"a";"x"
"b";"y"
"";"z"
is interpreted as:
--------
|a|x   |
|b|y   |
|z|NULL|
--------
Both columns are set to "key" in the assert part of the test case:
<assert>
    <equalTo>
        <column index="0" role="key" type="text"/>
        <column index="1" role="key" type="text"/>
        <resultSet file="ResultSets\ResultSet.csv"/>
    </equalTo>
</assert>
The corresponding query returns:
--------
|a   |x|
|b   |y|
|NULL|z|
--------
Is it possible to compare the two in NBi using other settings?
May 2, 2014 at 10:41 AM
From your description, it’s apparently a bug in the CSV parser. The good news is that you should be able to work-around it. On the third line of your CSV file you could replace
"";"z"
by
"(null)";"z" 
You'll learn more about special values here

I’ll also analyse this bug in the CSV parser and fix it in a next release (if confirmed).
Marked as answer by Seddryck on 7/30/2014 at 6:08 PM
May 2, 2014 at 11:11 AM
Thanks a lot! Works like a charm. :-)