Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSV file: String value NA not imported #1323

Closed
uwegeercken opened this issue Feb 25, 2023 · 1 comment · Fixed by #1331
Closed

CSV file: String value NA not imported #1323

uwegeercken opened this issue Feb 25, 2023 · 1 comment · Fixed by #1331
Assignees
Labels
bug Something isn't working

Comments

@uwegeercken
Copy link

uwegeercken commented Feb 25, 2023

I tried to load some CSV data into a node table. The CSV file was very simple and contains a single column with 2-letter country codes, no header and the values are NOT quoted.

CSV sample:
MY

MZ

NA

NC

NE

The data was correctly imported except for the value: NA

` kuzu> create node table Country(code string, primary key(code));
kuzu> copy Country from "data/countries-test.csv";

| 5 number of tuples has been copied to table: Country. |

`

Result:

` kuzu> match(c:Country) return c.code;

| c.code |

| MY |

| MZ |

| |

| NC |

| NE |

(5 tuples)
Time: 9.82ms (compiling), 0.59ms (executing)
`

I assume that NA is interpreted as "not available" respectively null. If the String is quoted then the value is correctly imported.

Uwe

@ray6080
Copy link
Contributor

ray6080 commented Feb 26, 2023

Hi @uwegeercken , thanks for reporting this! Yes, you're right, the reason behind this "bug" is because NA is not correctly interpreted as a non-null string value. We currently use arrow's CSV reader, and by default configures it to allow a set of "null_values" (including NA) interpreted as NULLs for strings. We're changing this soon, and will update you here soon as it's done.
Thanks!

@ray6080 ray6080 added the bug Something isn't working label Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants