PGX 20.1.1


PGX provides three different ways for running graph analytics. First, the user can perform SQL-like pattern-matching against graphs using the Property Graph Query Language (PGQL). Second, the user can write graph algorithms in the domain-specific language Green-Marl and have these compiled to highly-optimized code. Third, PGX supports a broad set of algorithms such as PageRank and Betweenness Centrality out of the box.

Graph Queries

Graph pattern matching aims to find patterns of a users' interest in a large graph. PGQL, the Property Graph Query Language, is a SQL-like language for graph pattern-matching, which includes both SQL-like value-based constraints and topological constraints.

Graph Algorithms

PGX contains a very large collection of built-in algorithms which are part of the Analyst API - covering such domains as community detection, ranking, partitioning, recommendation generation and more. A full list of algorithms and instructions on how to invoke them can be found on the Built-In Graph Algorithms page.

Custom Algorithms

A custom graph algorithm that is not part of the built-in package, can still be implemented on PGX. For this purpose, PGX adopts a Domain Specific Language (DSL) approach.

Users can implement the algorithm using Green-Marl, a DSL for graph algorithms, or the PGX Algorithm Java API, as a front-end language. PGX takes care of compiling, optimizing, and executing the algorithm.

Note that all built-in algorithms of PGX are, in fact, created from the corresponding Green-Marl programs. The DSL approach provides the following benefits:

  • Productivity. Green-Marl provides high-level graph-specific data types and operators with which the user can program their algorithms intuitively.
  • Performance. PGX compiles the given Green-Marl program into a PGX-executable binary. In doing so, the Green-Marl compiler applies several optimizations as well as parallelization. Many of these optimizations are only possible because of the high-level semantics that the Green-Marl language provides.
  • Portability. Green-Marl helps PGX to maintain forward portability. Green-Marl programs, once written, can still be executable by future versions of PGX — no matter how much of its internal implementation might have changed.