0
votes

All

I'm a very ne beginner with Neo4j.

Now I've data import problem.

I use java and python to import data from oracle to neo4j and found both are too slow(I have about 100 million rows of the table) So I consider Cypher Sentence: LOAD CSV

I export the csv file of Movie Graph of the community, as the image shown.

Now how can I use the LOAD CSV (export.csv) to build a graph data to restore the Movie Graph? I found little info on the Neo4J manual about import data.

Thanks!![enter image description here][1]

Yours, Jesse

1
Please read: neo4j.com/developer/guide-import-csv/ and neo4j.com/developer/guide-importing-data-and-etl/Michael Hunger
Your image is missing!Michael Hunger
and share your load csv statement and the output of :schemaMichael Hunger

1 Answers

1
votes

There's actually pretty good documentation on how to use LOAD CSV.

It's full of useful examples.

They even have an example that's directly tied to the movies CSV:

LOAD CSV WITH HEADERS FROM "http://neo4j.com/docs/2.1.7/csv/import/movies.csv" AS csvLine
MERGE (country:Country { name: csvLine.country })
CREATE (movie:Movie { id: toInt(csvLine.id), title: csvLine.title, year:toInt(csvLine.year)})
CREATE (movie)-[:MADE_IN]->(country)

Vaya con dios, mi amigo.