I'm trying to provide a WCC (weakly connected components) analysis for my graph
It's very big. I'm trying to make a projection of my graph with
gds.graph.project.cypher(MY_QUERY)
But it doesn't work and returns the following:
Failed to invoke procedure `gds.graph.project.cypher`: Caused by: org.neo4j.graphdb.NotInTransactionException: The transaction has been closed.
And a funny moment is that when I manually reduce number of nodes in my projection it does work
So question 1
How can I avoid this error?
**Question 2 (optional)
**Further on, if my main graph gets some new relationships, do I have to start the whole procedure again? Or I can somehow use the results, computed 1 step before
Or maybe I should use something else?
Thank u in advance, badly need your help - I'm already about to give in
I don't see an obvious reason for an 'out of transaction' error. What happens when you run the node and relationship queries in the browser.
The only comment I have is I would think the 'with [a, a2] as a1' statement should follow the 'where' clause, as I would think the other variables the query references in the 'where' clause are out of scope when executed in this order. It's odd, but the query plan does show all the variables being projected through the 'with' clause.
When i run both node and relationship, they work fine
Very slow, but still fine
And a funny thing by the way:
Before that I used to try to execute the same code, but instead of "taxi_type" i just passed the ids as an argument (via jupyter notebook)
And the projection did execute with a small amount of ids (about 100), and failed on bigger numbers(1000+)
I thought, the problem might be because of a huge length of argument, so I created those types directly on Neo
But still it fails ;(
And well, I actually don't even get the meaning of this error - if it didn't have enough space, ok, that would be clrear
But why the transaction is closed?)
I just thought of something. Your relationship query returns source and target ids in the second match of the union, but these don't correspond to the ids of the nodes related by a relationship. I don't think this is legit. Try your projection without this part of the relationship query.
That error is occurring in the gds library. It would occur if the code tries to access a node outside the transaction that was used to find the node.
I've changed the first parts of queries (before "UNION") and now that works!
So the problem was that I had several unused node ids that were not mentioned in relations?
But what if I wanted to scan any nodes without relations, to receive all components, even containing just 1 node?
And besides, I don't get how can that be:
_"...source and target ids in the second match of the union, but these don't correspond to the ids of the nodes related by a relationship"
_To me, I match all the nodes I'm interested in the first query, just as a set of nodes
And then I match the pairs of nodes (actually I don't need them to be oriented)