Questions tagged [load-csv]

Tag for Neo4j questions related to the LOAD CSV command.

LOAD CSV is a file import / data ingestion clause for 's , which imports data from files.

Example of use

LOAD CSV FROM 'http://neo4j.com/docs/2.3.2/csv/artists.csv' AS line
CREATE (:Artist { name: line[1], year: toInt(line[2])})

References

90 questions
1
vote
3 answers

Error while working on .csv with load_csv

I am trying to work on the below code: ds = load_csv('C:\\User.csv') f = open(ds,'r') lines = f.readlines()[1:] print(lines) f.close() First line of dataset is string. I am getting the below error: TypeError: expected str, bytes or os.PathLike…
AHF
  • 1,070
  • 2
  • 15
  • 47
1
vote
0 answers

Neo4j how to load relations from csv with attributes

I have been trying to load 2 csv files to create entities and relation. This one is for the entities: USING PERIODIC COMMIT 1000 LOAD CSV WITH HEADERS FROM "file:///jobs.csv" AS row MERGE (j:JOB {order_id: row.child_order_id}) SET j.job_name =…
1
vote
0 answers

Importing data into Neo4j from S3 bucket using authentication

I'm new to Neo4j and testing it on EC2 server, to see if we could use it for storing our ~1.5 nodes and their connection (currently using a Redshift). I want to load all the data from Redshift to the Neo4j DB. I also work a lot with EMRs and usually…
JustinCase
  • 171
  • 1
  • 11
1
vote
1 answer

How to prevent duplications with merge in neo4j and make the query faster?

I have this cypher query to insert 10,000 node. This works nice. LOAD CSV WITH HEADERS FROM "file:///persons.csv" AS csv MERGE (u2:User {mobileNumber: csv.mobileNumber}) ON CREATE SET u2.memberType = csv.memberType ON CREATE SET…
sad_man
  • 25
  • 5
1
vote
1 answer

Cypher restrictions on queries chained after a load csv

I'm currently importing some relationships in my graph using bolt driver in .net. I wanted to try the load csv command for this case (source is in csv) and compare performence but the query is only applied to the first row. I tested with a skip n…
Pierre Jeannet
  • 255
  • 1
  • 10
1
vote
2 answers

Some way to create 1 million relationships with a neo4j query

With this query I am importing 75000 nodes from my csv file. (Category) USING PERIODIC COMMIT LOAD CSV WITH HEADERS FROM "file:///prodcategory.csv" AS row CREATE (:Category {id: row.idProdCategory, name: row.name, idRestaurant:…
Claure
  • 55
  • 1
  • 1
  • 4
1
vote
1 answer

How does load csv create relations in neo4j?

I am using the following commands to load data from a csv file into Neo4j. The input file is large and there are millions of rows. While this query is running I can query for the number of nodes and check the progress. But once it stops creating…
Harit Vishwakarma
  • 2,338
  • 4
  • 21
  • 36
1
vote
1 answer

Neo4j Cypher - adding a property with LOAD CSV

I have a set of nodes created using file_A which contains a column with the 'id' of each node. It has been created using this Cypher query (in Java): USING PERIODIC COMMIT 1000 LOAD CSV WITH HEADERS FROM 'file:file_A' AS line FIELDTERMINATOR…
Vicente
  • 35
  • 5
1
vote
2 answers

Batch processing in cypher Or upload multiple files from Neo4j browser

I am loading data from csv to Neo4j using the following query: CREATE CONSTRAINT ON (e:Entity) ASSERT e.entity IS UNIQUE; USING PERIODIC COMMIT 1000 LOAD CSV WITH HEADERS FROM 'file:/file1.csv' AS line FIELDTERMINATOR '|' WITH line MERGE…
1
vote
0 answers

Couldn't load the external resource at: http://{IP}:{Port}/XXX

I have a problem with loading csv data … This is my use case : I have a MVC controller which returns CSV files. When I access “‘http://{MY IP}:8083/site’” via a browser like Chrome it returns the data I want … however when I access this from Neo4j…
Lina
  • 1,217
  • 1
  • 15
  • 28
1
vote
1 answer

Using combination of attributes to set uniqueness in Cypher Query Language

I have a flight database in the form of csv with date and flight number among other columns. date flight 01-01-2011 12:00 428 02-01-2011 12:00 428 03-01-2011 12:00 428 01-01-2011…
Anonymous
  • 11
  • 2
1
vote
1 answer

Neo4j CSV import query super slow, when setting relationships

I am trying to evaluate Neo4j (using the community version). I am importing some data (1 million rows) using the LOAD CSV process. It needs to match previously imported nodes to create a relationship between them. Here is my query: //Query…
Albert S
  • 2,552
  • 1
  • 22
  • 28
1
vote
2 answers

Unexpected Eager Query profile in Cypher

So I'm generating a rather large Neo4J instance, and I'm loading this using LOAD_CSV. I've read as many blogs as I could find about optimising queries to remove Eager reads from the query plan, but I've come against an example that I can't…
greg_data
  • 2,247
  • 13
  • 20
1
vote
0 answers

neo4j load csv is very slow

I am trying to load a CSV file into my Neo4j database hosted on GrapheneDB. It worked fine on the first file with 5000 rows. It took about 16 seconds to complete this file. I am now importing the second file with the same schema and same amount of…
Sonu Kapoor
  • 1,567
  • 3
  • 16
  • 34
1
vote
1 answer

How do I make Cypher respect character encoding when using LOAD CSV in browser?

My case: List of Danish-named students (with names including characters as ü,æ,ø,å). Minimal Working Example CSV file: Fornavn;Efternavn;Mobil;Adresse Øjvind;Ørnenæb;87654321;Paradisæblevej 125, 5610 Åkirkeby Süzette;Ågård;12345678;Ærøvej 123, 2000…