Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
07-22-2022 03:46 AM
I'm using AuraDB free tier.
Trying to import the following csv file with Cypher:
messagetime,correlatioId,messageIntent,messageType,originatingEndpoint,processingEndpoint,timestamp
a,b,c,d,e,f,g
Cypher command:
At https://www.dropbox.com/s/i5enrzq1imhknab/sendCommandsMini.csv?dl=0 @ position 8022 - 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: 'number"!'
Tried hosting with github and drive, same problem
At https://drive.google.com/file/d/1OkZBSQADIB-912mPyb49FTuPhnkvrV6g/view?usp=sharing @ position 18698 - 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: 'error")'
Please help,
Solved! Go to Solution.
07-22-2022 04:24 AM
When the URL is requested, the response should be the CSV as a raw file.
For the Google Drive URL, you can enforce raw download for the file by requesting the URL in the below format:
'https://drive.google.com/uc?id=<google_file_id>&confirm=t'
So your Cypher would be:
LOAD CSV WITH HEADERS FROM "https://drive.google.com/uc?id=1OkZBSQADIB-912mPyb49FTuPhnkvrV6g&confirm=t" AS relRecords FIELDTERMINATOR ','
RETURN linenumber() AS number, relRecords
07-22-2022 04:24 AM
When the URL is requested, the response should be the CSV as a raw file.
For the Google Drive URL, you can enforce raw download for the file by requesting the URL in the below format:
'https://drive.google.com/uc?id=<google_file_id>&confirm=t'
So your Cypher would be:
LOAD CSV WITH HEADERS FROM "https://drive.google.com/uc?id=1OkZBSQADIB-912mPyb49FTuPhnkvrV6g&confirm=t" AS relRecords FIELDTERMINATOR ','
RETURN linenumber() AS number, relRecords
07-25-2022 02:32 AM
Thanks so much, I used your recommendation and it worked.
PS. For those of you that have the same issue, please also make sure to give permission to anyone with the link to view the file.
02-08-2023 02:13 PM
The correct syntax using Dropbox is using the "dl=1" flag. This indicates to download the file as raw.
LOAD CSV WITH HEADERS FROM 'https://www.dropbox.com/s/i5enrzq1imhknab/sendCommandsMini.csv?dl=1' AS relRecords FIELDTERMINATOR ','
RETURN linenumber() AS number, relRecords
All the sessions of the conference are now available online