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.

Couldn't display all nodes on Gephi from Neo4j

I ve been working on this since a long time and it works perfectly . But this time I used the same queries and I realized that I am not displaying all nodes just after deleting duplicates nodes !
I have 151 unique node but it displays only 45 !
Here is all queries that I used :

LOAD CSV WITH HEADERS FROM 'file:///ContratFP.csv' AS Contracts
CREATE (c:Contrat {
id: Contracts.contract_id, 
object: Contracts.contract_complete_object ,
description: Contracts.contract_description, 
duration: Contracts.contract_duration,
state: Contracts.contract_state,
type: Contracts.contract_duration,
duration: Contracts.TYPE
})

LOAD CSV WITH HEADERS FROM 'file:///AttribFP.csv' AS AttributairesFP
CREATE (at:Attributaires {
id: AttributairesFP.beneficiary_SIREN,
label: AttributairesFP.NAME_beneficiary,
city: AttributairesFP.beneficiary_city,
dep : AttributairesFP.beneficiary_department_code,
awarded_amount_single_value : AttributairesFP.beneficiary_awarded_amount_single_value
})

LOAD CSV WITH HEADERS FROM 'file:///RelationFP.csv' AS Contracts
MATCH (c:Contract {id: Contracts.contract_id}) , (at:Attributaires {id: Contracts.beneficiary_SIREN})
MERGE (c)-[:ASSIGNED_FP]->(at)

match path = (at1:Attributaires)-[:COLLABORATE_WITH_FP]->(at2:Attributaires)
with collect(path) as paths
call apoc.gephi.add(null,'workspace1', paths) yield nodes, relationships, time
return nodes, relationships, time

MATCH (at:Attributaires)
WITH at.id as id, collect(at) AS nodes
WHERE size(nodes) >  1
FOREACH (at in tail(nodes) | DETACH DELETE at)

HELP PLEASE 🙂

1 ACCEPTED SOLUTION

Where does it only display 45?

You probably want to use an OPTIONAL MATCH to also find nodes that have no relationship?

View solution in original post

2 REPLIES 2

Where does it only display 45?

You probably want to use an OPTIONAL MATCH to also find nodes that have no relationship?

Yes I just got nodes which have relationships 🙂 Thanks Micheal 🙂

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online