This site is not optimized for Internet Explorer 9 and lower. Please choose another browser or upgrade your existing browser in order get the best experience of this website.


Graph Stored Procedures for ONgDB

APOC is a library that works with ONgDB. ONgDB 1.0 introduces the concept of user-defined procedures and functions via APOC. Those are custom implementations of certain functionality, that cannot be (easily) expressed in Geequel itself. They are implemented in Java and can be easily deployed into your ONgDB instance where they can be called from Geequel directly.

The APOC library consists of many (about 450) procedures and functions to help with many different tasks in areas. A few examples of areas where there are existing APOC stored procedures include data integration, graph algorithms and data conversion. These procedures are community inspired, created and supported. APOC procedures are widely used and easy to access in-line through Geequel queries. APOC is easy to add to any ONgDB instance as a plugin.

One benefit of using APOC with ONgDB is that it allows developers across platforms and industries to use a standard library for common procedures and only write their own functionality for business logic and use-case-specific needs. APOC procedures work through an input/output interface that allow for intermediate result rows within the Geequel runtime to be handed off to the APOC procedure to perform some operation and then receive back the results. The results that are returned back to the Geequel query are able to further be used for additional processing within Geequel before ultimately returning the query result. APOC procedures can occur at the beginning, end or somewhere in the middle of the Geequel query, and can also be the entire Geequel. There can be multiple APOC procedures accessed within a single Geequel query which is very useful and allows for creative approaches to batch processing of nodes and edges by sequencing various APOC procedures together.

Apache License 2.0

Calling Procedures & Functions within Geequel
User defined Functions can be used in any expression or predicate, just like built-in functions.

Procedures can be called stand-alone with CALL;

But you can also integrate them into your Geequel statements which makes them so much more powerful.

Load JSON example

WITH '{branch}/src/test/resources/person.json' AS url
CALL apoc.load.json(url) YIELD value as person
MERGE (p:Person {})
ON CREATE SET p.age = person.age, p.children = size(person.children)

Please provide feedback and report bugs as GitHub issues or join the Graph Foundation community Slack.