LOAD CSV WITH HEADERS FROM url-value
AS row // row is a variable that is used to extract data
id,title,country,year,summary
1,Wall Street,USA,1987, Every dream has a price.
2,The American President,USA,1995, Why can't the most powerful man in the world have the one thing he wants most?
3,The Shawshank Redemption,USA,1994, Fear can hold you prisoner. Hope can set you free.
LOAD CSV WITH HEADERS
FROM 'http://data.neo4j.com/intro-neo4j/movies_to_load.csv'
AS line
RETURN line
╒══════════════════════════════════════════════════════════════════════╕
│"line" │
╞══════════════════════════════════════════════════════════════════════╡
│{"summary":" Every dream has a price.","country":"USA","year":"1987","│
│id":"1","title":"Wall Street"} │
├──────────────────────────────────────────────────────────────────────┤
│{"summary":" Why can't the most powerful man in the world have the one│
│ thing he wants most?","country":"USA","year":"1995","id":"2","title":│
│"The American President"} │
├──────────────────────────────────────────────────────────────────────┤
│{"summary":" Fear can hold you prisoner. Hope can set you free.","coun│
│try":"USA","year":"1994","id":"3","title":"The Shawshank Redemption"} │
└──────────────────────────────────────────────────────────────────────┘
LOAD CSV
FROM 'http://data.neo4j.com/intro-neo4j/movies_to_load.csv'
AS line
RETURN line
╒══════════════════════════════════════════════════════════════════════╕
│"line" │
╞══════════════════════════════════════════════════════════════════════╡
│["id","title","country","year","summary"] │
├──────────────────────────────────────────────────────────────────────┤
│["1","Wall Street","USA","1987"," Every dream has a price."] │
├──────────────────────────────────────────────────────────────────────┤
│["2","The American President","USA","1995"," Why can't the most powerf│
│ul man in the world have the one thing he wants most?"] │
├──────────────────────────────────────────────────────────────────────┤
│["3","The Shawshank Redemption","USA","1994"," Fear can hold you priso│
│ner. Hope can set you free."] │
└──────────────────────────────────────────────────────────────────────┘
LOAD CSV WITH HEADERS
FROM 'https://data.neo4j.com/intro-neo4j/movies_to_load.csv'
AS line
CREATE (movie:Movie { movieId: line.id, title: line.title, released: toInteger(line.year) , tagline: trim(line.summary)})
title;released;summary;actor;birthyear;characters
Back to the Future;1985;17 year old Marty McFly got home early last night. 30 years early.;Michael J. Fox;1961;Marty McFly
Back to the Future;1985;17 year old Marty McFly got home early last night. 30 years early.;Christopher Lloyd;1938;Dr. Emmet Brown
LOAD CSV WITH HEADERS
FROM 'https://data.neo4j.com/intro-neo4j/movie_actor_roles_to_load.csv'
AS line FIELDTERMINATOR ';'
RETURN line
댓글남기기