Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
10-09-2018 02:14 AM
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 🙂
Solved! Go to Solution.
10-09-2018 03:01 PM
Where does it only display 45?
You probably want to use an OPTIONAL MATCH
to also find nodes that have no relationship?
10-09-2018 03:01 PM
Where does it only display 45?
You probably want to use an OPTIONAL MATCH
to also find nodes that have no relationship?
10-12-2018 08:25 AM
Yes I just got nodes which have relationships 🙂 Thanks Micheal 🙂
All the sessions of the conference are now available online