Skip to main content


Jacqueline: A JSON Query Language for MonetDB

MonetDB/JAQL is an implementation of the Query Language for JavaScript Object Notation (JSON) on top of MonetDB's relational column-store engine. It implements JAQL Core from its specifications, thereby ignoring the Hadoop-centric view that flows through the various examples. The result is a pure column-store JSON query processing system, benefitting from the power of the MonetDB engine.

Note: MonetDB/JAQL was first released as a beta in the Jul2012 release. It is, however,  a work in progress ! It requires major changes to comply with the single columnar approach under development. It is likely to be dropped in an upcoming 2014 release.

JAQL is a query language for the JSON data-format. JSON itself is a free-form format that allows to e.g. express hierarchical data or mix datatypes. It is similar to XML in this respect, albeit a whole lot more limited, which greatly simplifies working with JSON data. Increasing popularity for the JSON format has stimulated support for JSON in many popular programming languages, and development of query languages. We have chosen to implement JAQL Core, for it appears to be designed with the same simplicity in mind as JSON itself, unlike XQuery alike alternatives.

The driving force behind JAQL is the use of pipes to create a flow of JSON data between operations. Typically, a pipeline starts with a data source to operate on. Operations are chained, operating on the output of the previous operation. This constitutes in a logical flow per operator, suitable for MapReduce-like parallelisation. The core operations from JAQL are similar to SQL's operations. This includes a selection operation filter and general purpose projection operation transform.

To quickly give an impression on JAQL, an example query that selects data from an input and projects it into another shape:

  {"name": "Fabian", "data": [1, 3, 4]},
  {"name": "Niels", "data": [3, 5]},
  {"name": "Martin"}
   -> filter 3 in $.data
   -> transform $.name;

would result into an array with two members: [ "Fabian", "Niels" ].

The current state of MonetDB/JAQL has implemented JAQL Core. The core operators can be found in the JAQL documentation. It is important to note that MonetDB/JAQL differs from the original JAQL specification in many subtle ways.

  • The MonetDB implementation is deliberately more strict in syntax for JSON snippets by requiring quotes around object names, e.g. [ { a: 1 } ] is not allowed, because the JSON valid syntax is [ { "a": 1 } ].
  • Assignments to variables are only supported by the equals sign (=).
  • JSON schema information or schema types are not supported.
  • Creating a record from another record cannot use a dynamic subset using the syntax a{* - .b}. Selecting all members (a.*) is supported, though.