Download CSV file from Dropbox for Neo4j

I saved the csv file to Dropbox and I want to upload them to Neo4j.

Link for the shared file Node csv users : https://www.dropbox.com/s/6kibjeea5e4cks1/users.csv?dl=0

This is cypher

USING PERIODIC COMMIT 100

LOAD CSV WITH HEADERS FROM "https://www.dropbox.com/s/6kibjeea5e4cks1/users.csv?dl=0" AS line

CREATE(u:User{userId: toInt(line.Id), username: line.UserName, fullname: line.FullName})

The version of Neo4j that I am using is Neo4j Enterprise version 3.0.9.

The result showed that he successfully created Node users, but created more than 300 nodes with no username and full name, although these are 9 nodes with a username and full name in the CSV file. What am I missing?

I tried to change the URL from the shared link to the download link , but the error Failed to load an external resource .

+4
4

dropbox gDrive, , , . csv , , .

USING PERIODIC COMMIT 100
LOAD CSV WITH HEADERS FROM "https://docs.google.com/spreadsheets/d/e/2PACX-1vRANVgt-GZf0Un8dyrf7YPITDgAIBzTwjTcqOu_G7mBhGKOEZskf6Mt2oTdInyQ-wLPE0aOzsW6lVD_/pub?gid=5399540&single=true&output=csv" AS line
CREATE(u:User{userId: toInt(line.Id), username: line.UserName, fullname: line.FullName})

>

enter image description here

  • csv
  • ""

url csv

enter image description here

+4

- , Dropbox :

$ curl -i --raw https://www.dropbox.com/s/6kibjeea5e4cks1/users.csv?dl=0
HTTP/2 302
server: nginx
date: Mon, 24 Jul 2017 14:46:44 GMT
content-type: text/html; charset=utf-8
content-length: 0
location: https://dl.dropboxusercontent.com/content_link/Z2KG0dzjBlHuMnIXyApZvBZFICVBXnLErAeLwlrkH46xnjg5yfd59ZfboKUpCNdo/file

:

$ curl -i --raw https://dl.dropboxusercontent.com/content_link/Z2KG0dzjBlHuMnIXyApZvBZFICVBXnLErAeLwlrkH46xnjg5yfd59ZfboKUpCNdo/file
HTTP/2 200
server: nginx
date: Mon, 24 Jul 2017 14:47:46 GMT
content-type: text/csv; charset=utf-8
content-length: 231
+3

, https://www.dropbox.com/s/6kibjeea5e4cks1/users.csv?dl=0 HTML- CSV .

Cypher:

LOAD CSV WITH HEADERS FROM "https://www.dropbox.com/s/6kibjeea5e4cks1/users.csv?dl=0" AS line
RETURN line LIMIT 3

:

╒══════════════════════════════════════════════════════════════════════╕
β”‚"line"                                                                β”‚
β•žβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•‘
β”‚{"<!DOCTYPE html><html lang=\"en\" xmlns:fb=\"http://ogp.me/ns/fb#\" xβ”‚
β”‚ml:lang=\"en\" class=\"maestro\" xmlns=\"http://www.w3.org/1999/xhtml\β”‚
β”‚">":"<head><link href=\"https://cfl.dropboxstatic.com/static/css/accouβ”‚
β”‚nt/emails-vflCV9b0W.css\" type=\"text/css\" crossorigin=\"anonymous\" β”‚
β”‚rel=\"stylesheet\" />"}                                               β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚{"<!DOCTYPE html><html lang=\"en\" xmlns:fb=\"http://ogp.me/ns/fb#\" xβ”‚
β”‚ml:lang=\"en\" class=\"maestro\" xmlns=\"http://www.w3.org/1999/xhtml\β”‚
β”‚">":"<link href=\"https://cfl.dropboxstatic.com/static/css/deprecated/β”‚
β”‚components/multiaccount_login_modal-vflNhUM8J.css\" type=\"text/css\" β”‚
β”‚crossorigin=\"anonymous\" rel=\"stylesheet\" />"}                     β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚{"<!DOCTYPE html><html lang=\"en\" xmlns:fb=\"http://ogp.me/ns/fb#\" xβ”‚
β”‚ml:lang=\"en\" class=\"maestro\" xmlns=\"http://www.w3.org/1999/xhtml\β”‚
β”‚">":"<link href=\"https://cfl.dropboxstatic.com/static/css/font_paper_β”‚
β”‚atlas_grotesk-vflEbKJso.css\" type=\"text/css\" crossorigin=\"anonymouβ”‚
β”‚s\" rel=\"stylesheet\" />"}                                           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

, DropBox ( ) .

+3

Want to download a CSV file from Dropbox for Neo4j. You can also do this using Google Drive, and you can also create direct links to download many files with a simple trick . Check this out: How to create or generate a direct link to Google Drive using the link generator .

0
source

Source: https://habr.com/ru/post/1682130/


All Articles