How to call Apoc Procedures in Kafka Connect Cypher template?


I'm experimenting with with the Kafka / Confluent Neo4j-Sink-Connector. What i wanted to achieve is to send data from MongoDB via Kafka to Neo4j. So far I have succeeded in merging and creating simple nodes and relationships with properties.

However when I tried to call an apoc function like apoc.merge.relationships to dynamically choose my reltype depending on the content of a specific field in my mongodb nothing happens. Even a simple "CALL apoc.create.node (,{})" cypher template which should create a blank node every time neo4j receives a message from kafka produces no result.

As I can produce nodes with MERGE and CREATE I assume that the connection is working properly.

Has anyone succeeded in integrating apoc procedures in their kafka cypher-templates or is this a feature which is not supported?

It should be fine to use APOC from the sink connector, because APOC is just regular cypher. It is of course important to make sure APOC is installed and properly configured, but other than that you don't do anything special to make this possible.

It's hard to tell what's going on though in your scenario. Most helpful would be to provide exactly what your sink connector config is, and also to provide some details of what you see in query.log and debug.log on the server side, when the connector issues these APOC queries.