Search code examples
neo4jcypherload-csv

Neo4j Database error General Unknown Error


Load csv with headers from "https://drive.google.com/open?id=1pyWY81bKzcCF7T-i_-MyhY2kJ4Z8NYP8" as row
with row
return row

this is my code I am trying to access the csv file with 1 million records from my drive using load csv

It is giving me following error:

Neo.DatabaseError.General.UnknownError: At https://drive.google.com/open?id=1pyWY81bKzcCF7T-i_-MyhY2kJ4Z8NYP8 @ position 1750 -  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":'

I am not getting the issue can anyone help me solve this?


Solution

  • URL you entered is not the actual path of the file but the link to a page which opens the file from google drive. So the link you provided points to the HTML page and not the CSV file.

    If you want actual URL to the file try to download it and copy the URL that appears in the new tab.

    You can change your query as follows(updated with actual URL):

    Load csv with headers from "https://drive.google.com/uc?id=1pyWY81bKzcCF7T-i_-MyhY2kJ4Z8NYP8" as row
    with row
    return row
    

    Don't return a row if the file is large, the browser will become unresponsive.