Skip to content

Instantly share code, notes, and snippets.

@timmytofu
Created April 15, 2015 22:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timmytofu/ba39ae1bf3669bd36ba3 to your computer and use it in GitHub Desktop.
Save timmytofu/ba39ae1bf3669bd36ba3 to your computer and use it in GitHub Desktop.
CSV with quote at beginning of line breaks neo4j importing
id thetext
1 This works fine
2 So does this
3 But this "does not"
@timmytofu
Copy link
Author

Trying to import this CSV in Neo4j 2.2.1 will fail:

LOAD CSV WITH HEADERS FROM
  "https://gist.githubusercontent.com/timmytofu/ba39ae1bf3669bd36ba3/raw/3be7510f487c50b64259bb3e0c1e68ace9f6af69/bad-neo-import.csv"
  AS csv
CREATE (:Foo {fid: toInt(csv.id), thetext: csv.thetext});
At java.io.InputStreamReader@5bb72934:5 there's a field starting with a quote and whereas it ends that quote there seems  to be character in that field after that ending quote. That isn't supported. This is what I read: 'But this
""'

it works on 2.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment