Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
04-28-2022 08:09 AM
Hello,
I would like to check if a graph projection exists and if yes, drop it.
Here is the code tried without success:
</>CALL gds.graph.list()
YIELD graphName
WITH graphName AS graph
CALL gds.graph.drop(graph)
YIELD graphName
RETURN graphName</>
Neo4j Kernel:4.4.2:enterprise
gdsVersion:1.8.2
neo4jVersion:4.4.2
Thank you for your help.
Julie
Solved! Go to Solution.
04-28-2022 08:31 AM
Hello @julie.cavarroc and welcome to the Neo4j community
You could use directly (doc😞
CALL gds.graph.drop('your-graph-name', false) YIELD graphName;
If you want to drop all graph projections:
CALL gds.graph.list()
YIELD graphName
WITH graphName AS g
CALL gds.graph.drop(g, false)
YIELD graphName
RETURN graphName
Regards,
Cobra
04-28-2022 08:31 AM
Hello @julie.cavarroc and welcome to the Neo4j community
You could use directly (doc😞
CALL gds.graph.drop('your-graph-name', false) YIELD graphName;
If you want to drop all graph projections:
CALL gds.graph.list()
YIELD graphName
WITH graphName AS g
CALL gds.graph.drop(g, false)
YIELD graphName
RETURN graphName
Regards,
Cobra
04-28-2022 08:45 AM
Thank you for your answer.
It is for an automatic use. So I need:
Regards,
Julie
04-28-2022 08:46 AM
The query I sent you do the both at the time. It will delete the graph if it exists.
All the sessions of the conference are now available online