Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
10-31-2020 01:54 AM
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
10-31-2020 04:17 AM
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
10-31-2020 08:54 AM
I tried adding FIELDTERMINATOR on to my import line but it do nothing.
it returns 0 field but no error message
11-01-2020 01:15 AM
Please take the necessary videos suggested on cypher query language.
11-01-2020 09:04 PM
Hi kelvin,
Looks like the problem with .csv file. Contact me at ameyasoft@gmail.com.
11-01-2020 09:17 PM
okay thanks. i will email to you shortly
All the sessions of the conference are now available online