AuQL Scripts

The Aunsight Query Language or AuQL (pronounced "Au-quel") is a domain specific language (DSL) for extending Aunsight Workflows with rule-based decision-making mechanisms and advanced capabilities for editing and manipulating string data. The Aunsight platform stores, manages, and evaluates AuQL scripts through a platform service called the Scripting Engine. Scripts are primarily invoked as part of a workflow, whether it be for quality assurance on data, dynamic logical queries, generating dynamic text for emails, or other use cases.

The formal syntax of the AuQL DSL resembles Javascript and Python while abstracting away some of the complexities of these languages. This abstract language is useful as a middle-ground between the graphical design of Workflows and the in-depth control provided by custom user code run in a dedicated Aunsight Process.

Use Cases

AuQL scripts provide an optimal solution for a particular set of use cases within Workflows:

  • They provide a decision-making mechanism, which allows Workflows to branch off into two separate paths based on the output of a function.
  • They provide users with a set of tools for doing complex string or object manipulations that are not easy or even possible within existing Workflow components. For example, email messages to users can be generated by AuQL scripts.
  • They enable automated Quality Assurance checks to assure workflows are processing data properly before performing complex and costly manipulations to datasets.

Rule-Based Workflow Evaluation

One of the primary roles of AuQL scripts is to provide a mechanism for controlling the execution of workflows based on rules for evaluating data dynamically. The Script Engine provides a variety of questions about Aunsight objects and their contents using a Rule, a subtype of AuQL Script. Any script which returns only True or False can be deployed as a rule. This can be utilized for QA purposes as well as a logical branch within workflows via a specialized workflow component. Some example use cases include:

  • Does any value in my dataset fall outside of the expected range?
  • Was the last date my job was run a weekday?
  • Has my job been run in the past week?

When integrated into workflows, rules can be run automatically, making checks about the workflow and its associated information. Depending on the outcome of the rule evaluation, different courses of action can be taken via other workflow components, ranging from sending alerts to executing different workflow subgraphs.

For an example of rule-based workflow evaluation, see the Appendix reviewing one such case study, or read on to discover the tools, syntax, and builtin-operations for writing AuQL scripts along with various examples of how scripts are used to accomplish common tasks.