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

84 questions
9
votes
4 answers

Neo4j Cypher - creating nodes and setting labels with LOAD CSV

I’m trying to use LOAD CSV to create nodes with the labels being set to values from the CSV. Is that possible? I’m trying something like: LOAD CSV WITH HEADERS FROM 'file:///testfile.csv' AS line CREATE (x:line.label) ...but I get an invalid syntax…
bicpence
  • 157
  • 2
  • 8
5
votes
1 answer

Remove EAGER from Cypher LOAD CSV with only MATCH & CREATE relationship

neo4j version 2.3.1 Indexes exist on Stoptime.stop_sequence and Stoptime.key. Stoptime.stop_sequence is numeric. Graph: (Stoptime)-[:PART_OF]->(Trip) Statement: //USING PERIODIC COMMIT 1000 PROFILE load csv with headers from "file:///path/to/csv" as…
changingrainbows
  • 2,103
  • 1
  • 21
  • 30
4
votes
1 answer

Neo.ClientError.Statement.ExternalResourceFailed

load csv with headers from 'file:///C:/Users/user/Desktop/Neo4J' as row Create (:State_Code {state_cd:row.st_cd}) I have tried this code and it is throwing an error as: Neo.ClientError.Statement.ExternalResourceFailed: Couldn't load the external…
4
votes
2 answers

neo4j: Cypher LOAD CSV with uuid

I am starting to work with LOAD CSV of Cypher for Neo4J to import larger csv-files into my DB. I would like to add to each imported node a unique ID (uuid) as a property. My try was: LOAD CSV FROM "file:..." AS csvLine CREATE (c:Customer { uuid:…
Balael
  • 381
  • 2
  • 15
3
votes
1 answer

cypher statement returns (no changes, no rows)

I've watched Nicole White's awesome youtube “Using LOAD CSV in the Real World” and decided to re-create the neo4j data using the same method. I’ve cloned her git repo on this subject and have been working this example on the community version of…
Timothy Lombard
  • 743
  • 1
  • 7
  • 24
3
votes
1 answer

How to handle transaction rollback in Neo4j while Loading large data from csv using periodic commit

I am trying to import a large amount of data from csv to neo4j using neo4j-rest java api. To avoid out of memory exceptions , I am using periodic commit , so a sample java code would be : // just to let you know what classes I am using import…
Lina
  • 867
  • 10
  • 21
3
votes
5 answers

Neo4j LOAD CSV with Custom IDs

I'm using Neo4j 2.2.3 and have tried to import a CSV file with Cypher's LOAD CSV that looks like this: PRODUCT_ID,PRODUCT_DESC,PRODUCT_TYPE 99,"A","X" 999,"B","X" 9999,"C","Y" 99999,"D","Y" However, I'm having difficulty with the custom ID. Neo4j…
Ian
  • 1,154
  • 2
  • 14
  • 36
3
votes
4 answers

neo4j specify data-type during import from csv

is there a way to tell the neo4j the type of the value when importing? for example, does the neo4j knows if "2015-0104T10:33:44" is a date or string? thanks!
Lior Goldemberg
  • 794
  • 7
  • 21
2
votes
1 answer

Loading CSV with Cypher with certain column names as properties

I have a CSV like this with the first row being header (H1, H2, H3,...) - H1,H2,H3,H4,H5,... a1,a2,a3,a4,a5,... b1,b2,b3,b4,b5,... I already have a neo4j database in which I use the first column (H1) to merge the nodes and use the rows of H2 and H3…
user2167741
  • 221
  • 1
  • 9
2
votes
1 answer

loading csv file from S3 in neo4j graphdb

I am seeking some suggestion about loading csv files from s3 bucket to neo4j graphdb. In S3 bucket the files are in csv.gz format. I need to import them into my neo4j graph db which is in ec2 instance. 1. Is there any direct way to load csv.gz…
Kalyan
  • 1,626
  • 6
  • 30
  • 51
2
votes
1 answer

How to update existing specific node in graphdb by loading updated CSV file in neo4J apoc

I am facing problem updating node by loading recently updated csv file in. neo4j. since it is a large file I think apoc procedure is need to be used. I have updated existing node by loading external updated file without apoc. but problem is I…
Kalyan
  • 1,626
  • 6
  • 30
  • 51
2
votes
1 answer

Neo4J ClientError.Statement.SyntaxError

I am getting Neo.ClientError.Statement.SyntaxError while loading data from CSV file. Neo.ClientError.Statement.SyntaxError: Invalid input 'h': expected 'i/I' (line 5, column 3 (offset: 189)) "Merge (Zip_Code:Zip_Code {code:…
2
votes
2 answers

Neo4j function "load csv with headers" does not load properties

I try to load the following nodes into Neo4j using load CSV with headers command: id label name 0 Person Dave 1 Person Boris 2 Person Rita 3 Person Daniel 4 Person Papa 5 Person Mama I save the Excel-Sheet as: CSV UTF-8 (Comma…
Grapheneer
  • 707
  • 5
  • 18
2
votes
2 answers

In Cypher, How to modify valid URL protocols for LOAD CSV command

This question has two parts: By default, what URL protocols are considered valid for specifying resources to Cypher's LOAD CSV command? So far, I've successfully loaded CSV files into Neo4j using http and file protocols. A comment on this…
smartcaveman
  • 38,142
  • 26
  • 119
  • 203
2
votes
2 answers

Load CSV Fails in Cypher + Neo4j "LoadExternalResourceException: Couldn't load the external resource at:"

I have a fresh install of Neo4j 2.1.4 open source on a corporate cloud server running Ubuntu 14.04. I am importing a CSV file into the database. The path to my file is '/home/username/data-neo4j/node.csv' Below is my command, which I run from the…
sheldonkreger
  • 778
  • 1
  • 7
  • 24
1
2 3 4 5 6