cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Apoc.trigger procedure throw exception

Hi,

I am new to Neo4j and Cypher. Now I use Neo4j community edition and try to develop my company's internal system.

I wanted to use apoc.trigger procedure and ran following command from Neo4j Lab.

CALL apoc.trigger.add('setAllConnectedNodes','UNWIND apoc.trigger.propertiesByKey($assignedNodeProperties,"surname") as prop
WITH prop.node as n
MATCH(n)-[]-(a)
SET a.surname = n.surname', {phase:'after'});

Then Neo4j throw following error message.

Failed to invoke procedure `apoc.trigger.add`: Caused by: org.neo4j.exceptions.SyntaxException: Unknown function 'apoc.trigger.propertiesByKey' (line 1, column 16 (offset: 15))
"EXPLAIN UNWIND apoc.trigger.propertiesByKey($assignedNodeProperties,"surname") as prop"
                                    ^

I have no idea why this procedure could not be execute. So could you please tell me solution?

Here is URL I referrd to.
https://neo4j.com/labs/apoc/4.3/background-operations/triggers/

Thanks in advance.

1 ACCEPTED SOLUTION

Most likely, you have installed the Apoc CORE version,
where the function is not present, see here:

In this case, you should install the FULL version (that is, the jar with the prefix -all) from here https://github.com/neo4j-contrib/neo4j-apoc-procedures/releases,
and put it into plugin neo4j folder, to have access to everything.

Obviously you have to download the compatible version,
so if you have for example neo4j 4.2.x you have to download apoc 4.2.x (4.2.0.7 to date)

View solution in original post

2 REPLIES 2

Most likely, you have installed the Apoc CORE version,
where the function is not present, see here:

In this case, you should install the FULL version (that is, the jar with the prefix -all) from here https://github.com/neo4j-contrib/neo4j-apoc-procedures/releases,
and put it into plugin neo4j folder, to have access to everything.

Obviously you have to download the compatible version,
so if you have for example neo4j 4.2.x you have to download apoc 4.2.x (4.2.0.7 to date)

Thank you @giuseppe.villani !

I don't know I need to install APOC FULL version.
I'll try to install it!