Exporting properties from Neo4j to Gephi doesn't work

apoc
cypher

(Mehdi Ajroud) #1

I am used to make the export from neo4j to Gephi without properties , but now I tried to add properties (actually just one which is 'id' by using this query :

MATCH path = (a:Attributaire2018)-[c:CollaborateWith2018]->(b:Attributaire2018)
CALL apoc.gephi.add(null,'workspace1',path,['id']) yield nodes
return *

But I am getting this error :


(Bratanic Tomaz) #2

property 'id' is already reserved for node id's I think when streaming to Gephi. You must use a different property name if you want to export it to Gephi.

Check the code at: https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/3.4/src/main/java/apoc/gephi/Gephi.java#L48


(Mehdi Ajroud) #3

well for the node "Attributaire2018" I already set id for its ID . How can I change it ?


(Mehdi Ajroud) #4

Btw for people who need an answer for my last question : here is the link : https://stackoverflow.com/questions/28618410/neo4j-renaming-property-keys/28618569


(Mehdi Ajroud) #5

@bratanic.tomaz even after changinf the name of the property , I am still having the same issue :confused:


(Bratanic Tomaz) #6

You will need to change the query to

CALL apoc.gephi.add(null,'workspace1',path,'weight',['siren'])


(Mehdi Ajroud) #7

Oh yeah ! I forgot about the weight ! Thank you again Tomaz :wink: