Real-Time Analytics Query Language
The Real-Time Analytics Query Language (RAQL) is an easy-to-learn, SQL-like language to query and analyze large, streaming datasets. Users access datasets in mashups using EMML extension statements that leverage RAQL.
RAQL gives you direct, streaming access to data:
![*](bullet.gif)
In files, without registering them as
Presto mashables.
![*](bullet.gif)
In databases or from URL-addressable services.
![*](bullet.gif)
In any number of snapshots for
Presto mashables or mashups.
![*](bullet.gif)
Stored in the
Presto Analytics In-Memory Stores.
Extension statements in EMML also let you store large datasets or query results in the Presto Analytics In-Memory Stores.
You can also use RAQL with results for any Presto mashable or mashup.
RAQL works with data in CSV, XML or JDBC result formats. Data should be in a flat hierarchy, with simple columns and rows. RAQL queries can:
![*](bullet.gif)
Filter dataset columns and rows using simple or complex criteria.
![*](bullet.gif)
Sort data with any number of levels.
![*](bullet.gif)
Group data in groups, partitions or windows and analytic functions to these sets.
![*](bullet.gif)
Use subqueries and many other common SQL features to handle complex requirements.
![*](bullet.gif)
Use the plain and analytic functions that are built into
Presto plus any extensions that user define.
RAQL Extensions: User-Defined Functions
In addition to the RAQL functions built into Presto, you can define additional functions to use in RAQL queries to handle unique or domain-specific needs. User-defined functions can be plain functions. Or they can be aggregate or window analytic functions that use the Presto RAQL User-Defined Function API.
You add user-defined functions in libraries with library names that you assign. This allows you to manage functions and ensure that function names are unique.