SteveS
SteveS

Reputation: 4040

Can't load CSV from Drive to Neo4j

I am using the following cypher code:

LOAD CSV FROM "https://drive.google.com/file/d/12DiEwM8XatMZBXA6TdekxWl8qrsgVj3l/view?usp=sharing" AS requests RETURN requests

and getting the following error:

At https://drive.google.com/file/d/12DiEwM8XatMZBXA6TdekxWl8qrsgVj3l/view?usp=sharing @ position 1691 -  there's a field starting with a quote and whereas it ends that quote there seems to be characters in that field after that ending quote. That isn't supported. This is what I read: 'docs-fwds":'

Please advise how to fix it, I want to be able to load a simple CSV file from Drive to Neo4j.

Upvotes: 3

Views: 776

Answers (1)

Tomaž Bratanič
Tomaž Bratanič

Reputation: 6514

You need to use the download link instead of the sharing link. This works for me:

LOAD CSV WITH HEADERS FROM "https://drive.google.com/u/0/uc?id=12DiEwM8XatMZBXA6TdekxWl8qrsgVj3l&export=download" as row
RETURN row LIMIT 5

I got the download link by clicking on the download icon, which redirects you. You have to be fast to copy the redirect link and it should work. Perhaps there is a method with which you could reconstruct the query manually, so you don't have to be extremely fast to copy the download link, but I am not aware of it.

Upvotes: 3

Related Questions