Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
12-17-2021 09:56 AM
Hi all,
I have the following Cypher query that runs well on Neo4j browser pointing to my local DB:
CALL apoc.meta.data() YIELD label, property, type, elementType
WHERE elementType <> 'relationship'
AND type <> 'RELATIONSHIP'
WITH label, collect(property + ' (' + type + ')') AS properties
WITH apoc.map.fromLists(collect(label), collect(properties)) AS properties_map
CALL apoc.meta.graph() YIELD nodes, relationships
UNWIND nodes AS n
WITH n, apoc.node.labels(n)[0] AS label, properties_map, relationships
CALL apoc.create.setProperty(n, 'properties', apoc.text.join(properties_map[label], '\n')) YIELD node
RETURN collect(node) AS nodes, relationships;
However, when I paste this as a search phrase in Bloom and as a query in Data explorer for neo4j plugins I receive the following error:
"Writing in read access mode not allowed. Attempted to write to internal graph 0 (neo4j)".
I have figured out that the issue is when executing apoc.create.setProperty probably because It's a write operation but I don't know why these kind of operations cannot be performed on both plugins.
Any help might be appreciated.
Thanks,
Leonardo.
12-20-2021 05:20 AM
I am quite sure that the bug is due to an incorrect handling of virtual nodes into Neo4j Bloom.
That is, the apoc.meta.graph()
return a virtual graph with virtual nodes and virtual relationships (see Virtual Nodes/Rels - APOC Documentation), which are similar to "real" entities but with negative ids.
I think that Neo4j Bloom doesn't recognize this negative ids,
in fact even this simple query fails, in Bloom:
CALL apoc.create.vNode(['Score'], {}) YIELD node AS n
CALL apoc.create.setProperty(n, 'properties', 'test')
YIELD node RETURN node;
All the sessions of the conference are now available online