Issue with undefined nodes

Hi,

I have imported a csv file into a neo4j database. I am now using bloom to visualise the graph but im not able to expand nodes due to "Undefined node". I have included the cypher I used to import the data below as well as a screenshot of the Graph schema and a Screenshot of the error. I also included a screenshot showing that the node has relationships that should be expanding.

Thanks for your help,
Sam

Create constraint On (o:Organization) assert o.Name is unique;
Create constraint On (c:Contact) assert c.Name is unique;
Create constraint On (e:Employee) assert e.Name is unique;

Load csv with headers from 'file:///S.K_Meta_Contacts_Organizations.csv' as line

with line
Merge (c:Contact{Name:line.Name})

Merge (o:Organization{Name: toString(line.Organization)})
Create unique (o)<-[:'Works For']-(c)

Merge (e:Employee{Name: line.Owner})
Create unique (e)-[:Owner]->(c)



Looks like it did not create the relationships. Try this:

Replace 'Create unique ' with either 'MERGE' or 'CREATE' like
Create (o)<-[: Works For ]-(c) or MERGE (o)<-[: Works For ]-(c).

Also it is better not use empty spaces in labels. Replace the empty space with underscore like 'Works_For'.

I have tried all your suggestions with no joy, the relationship [Works for] is being created as is highlighted in screenshot 3, the space in the relationship type is compensated by using backticks in Cypher,

Thanks for your suggestions! Unfortunately neither merge or create solved my issue, its very frustrating as the Owner relationship works fine in bloom

Regards,
Sam

Based on your provided cypher, you have single quote around the Works for.

Create unique (o)<-[:'Works For']-(c)

I added some TestPerson to Work for TestCompany and Bloom seemed fine

MATCH (t:TestPerson {Name:'Sam'})
MERGE (c:TestCompany {Name:'OddJobs, Inc'})
CREATE UNIQUE (t)-[:`Works for`]->(c)

So maybe just the single quote vs backtick typo?

Is it possible that there is a missing organization in the csv?

If it's not the ` vs ' and it's not the cypher, then it's possibly the data?

HI, thanks for the test run, I only put in the single quates in there as when i put backticks into the forum they were not apperaring, I defo have the backticks in my cypher code, There is no missing organizations in my dataset, but there a few funny ones that are only numbers, im going to play arounf with toString to see if that helps the matter,

Thanks for your help

I have it sorted now, I added quatation marks to the companys with numbers for names in the csv file.

Thanks for all your suggestions. Note: GOing forward I wont be adding spaces to my relationships as Bloom still isnt to fond of the Works For relationship even tough the neo4j browser deals with it ok.#

Many Thanks,
Sam

1 Like