cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Databricks to Neo4j server load csv using cypher

learner
Node Link

I am trying to use the following to load a CSV file from Databricks notebook:

gds.run_cypher('LOAD CSV WITH HEADERS FROM "file:///FileStore/sample.csv" AS row')

The databricks and Neo4j servers are on different machine. I have no problem connecting and running cypher queries. I have uploaded a csv file in Databricks DBFS FIleStore. I want to now read this file as csv (not as dataframe) and create nodes in Neo4j.

The above gives me an error:

ClientError: Couldn't load the external resource at: file:/var/lib/neo4j/import/FileStore/sample.csv

2 REPLIES 2

learner
Node Link

I tried it the following way and it still failed:

gds.run_cypher('LOAD CSV WITH HEADERS FROM "dbfs:///FileStore/sample.csv" AS row') 

Wih the following error:

ClientError: Invalid URL 'dbfs:/FileStore/sample.csv': unknown protocol: dbfs

You need to place the file in the database’s imports directory. Is it located there?  
you can also use a different path by setting it in the database’s neo4j. config file.