Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
04-23-2021 01:32 PM
I have a CSV file to read with empty lines at the end:
,,,,,,
,,,,,,
I can only read from this csv and I can't copy it since it's the source and I'm not the one who create it, and it has to be automated without external software.
Is there an 'ignore empty lines' option with apoc.load.csv? I thought it was like that by default but if it was, not anymore with 4.2.5.
Thanks
04-24-2021 11:17 PM
Hello Gabriel, I think you can filter the results by adding a WHERE clause after the YIELD in which you test for null values.
(Or rather for empty strings:)
CALL apoc.load.csv("test.csv")
YIELD map as data, list
WITH data, list
WHERE NOT "" IN list
RETURN data, list
04-25-2021 03:50 PM
Yeah I did it this way but still apoc.load.csv should remove the empty lines by default as LOAD CSV clause does if I'm right.
It takes more cpu and memory and it's not useful anyway
All the sessions of the conference are now available online