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.

Problem in creating node

Hi, currently i'm having trouble in creating a node when import a file.

Here is one of the code in the file:
"reviewer_preferences": "{genre: {id: 14, name: 'Fantasy'}, production_company: {'name': 'Universal Pictures', 'id': 33}, production_country: {'iso_3166_1': 'US', 'name': 'United States of America'}}",
"reviewer_personal_details": "{fname: 'Rhea', lanme: 'Madsen', age: 23}",
"reviewer_id": "1",
"reviewer_username": "RhMadsen"

i want to create a note where personal details is separate into first_name, last_name and age. So as preferences too.

I'm using this code but it give error message where type mismatch:
LOAD CSV WITH HEADERS FROM "file:///reviewers.csv" AS l
WITH l WHERE l.reviewer_id IS NOT NULL
MERGE (r:Reviewer {id: l.reviewer_id})
ON CREATE SET r.username = l.reviewer_username,
r.details = l.reviewer_personal_details.fname

5 REPLIES 5

sam_gijare
Graph Buddy

Kelvin,

You can add FIELDTERMINATOR ";" to your import line.
And to get a test sample of the data you want to import you can use
Also please adjust leading whitespaces in your Cypher Query as per standards.
And you can take a look at this tutorial:
Watch “1120 - Using Load CSV in the Real World” on Vimeo: https://vimeo.com/112447027?ref=em-share .

Yours Kindly
Sameer

I tried adding FIELDTERMINATOR on to my import line but it do nothing.
it returns 0 field but no error message

sam_gijare
Graph Buddy

Please take the necessary videos suggested on cypher query language.

ameyasoft
Graph Maven

Hi kelvin,

Looks like the problem with .csv file. Contact me at ameyasoft@gmail.com.

okay thanks. i will email to you shortly