1. Getting started
DataQL (Data Query Language) is a language for querying and transforming data. Variables, expressions and functions organize computation; objects, lists and transformation templates shape the output. The SQL executor queries databases, and built-in libraries provide importable data-processing functions. Applications can extend both modules.
- Your first script: return a value, calculate a result and transform a list.
- Language basics: writing rules, types, variables and operators.
- Control flow and functions: branches, functions, imports and code fragments.
- Data access and transformation: parameters, nested data and output structures.
- Execution options: indexing and numeric precision hints.
- SQL executor: queries, dynamic rules, pagination and transactions.
- Built-in libraries: string, collection, date and JSON functions.
Run scripts in the Dataway console or embed the DataQL engine in an application.
A DataQL script
var people = [{"name": "Alice", "age": 25}, {"name": "Bob", "age": 30}];
return people => [{"name", "nextAge": age + 1}];
[{"name":"Alice","nextAge":26},{"name":"Bob","nextAge":31}]
var stores data, => transforms each item using a template, and return supplies the query result. Variables require no type declaration. Results can be individual values, objects or lists.
Reading order
Start here, then read language basics, control flow and functions, and data access and transformation. Use the SQL chapter for database work, the libraries for individual functions, and the Hint reference for execution options.
See the DataQL recipes for complete data-processing examples.