Screenshot of Aqua Data Studio 18.0.0 showing a script file ‘Create and Email Excel File.xjs’ under the ‘AquaScripts’ project. The script connects to an MS SQL Server database named ‘AdventureWorks 2012’ and executes a SQL query. It generates an Excel file with the query results at a specified file path and prepares to send the file via email. Variables for server connection, query execution, and email details (recipient, sender, subject, and message) are defined at the top of the script. A try-catch block manages the connection and email operations.

JavaScript IDE & Open APIs

Aqua Data Studio offers a full-fledged Integrated Development Environment (IDE) with a set of programming interfaces called Aqua Open APIs that access built-in functionalities such as database access, schema DDL generation, grid and pivot charts, compare tools, version control and much more. Developers can invoke Aqua Open APIs via AquaScript — a simple JavaScript based programming language supported in Aqua Data Studio. The IDE also provides tools for executing and debugging AquaScripts. AquaScripts have full access to the Java APIs and any proprietary Java libraries that you include in the Aqua Data Studio classpath.

AquaScript Templates greatly simplify the task of writing AquaScripts by offering templates for your most common scripting needs. Six in-built templates are included: creating and emailing Excel files, exporting schema objects and data, transferring files to/from remote systems, executing multi-server scripts, random table and data generation, and comparing schemas.

Aqua Data Studio scripting IDE includes the following functions:

Create AquaProjects to organize tasks
Use AquaScript Templates to automatically generate code for your most common scripting needs. These templates provide an easy to use interface to input values and create ready-to-execute scripts. Upon choosing a template, an AquaScript is generated & stored in the AquaScripts folder with the .xjs extension. Edit the AquaScript for further modification and executio.
Context-sensitive Help
The editor provides context-sensitive help as you write your scripts. Simply press Shift-F1 and the API documentation of the object you are currently working on (or have selected) will open in your web browser.
Create AquaScripts to automate tasks
Use Open APIs to write AquaScripts and build fully automated end-to-end solutions based on your business requirements. To create a new AquaScript select the AquaScripts folder from your AquaProject and use the Insert key to create a new AquaScript. AquaScripts are identified by their .xjs file extension. All of the Open APIs are available through the global variable named “aqua”, which is an instance of the “AQAqua” class. AquaScripts may also access any other proprietary or Open Source Java libraries included in the Java Virtual Machine (JVM) classpath. AquaScripts are executed within Aqua Data Studio using the Mozilla Rhino1 engine.
AquaScript Editor
The fully functional editor for AquaScripts provides autocompletion, syntax coloring, bookmarks, abbreviations, find/replace, incremental search and more.
Packaged Workbooks
Save your workbooks and data extracts to disk for later use or to share with colleagues. Save your full design, metadata and data extracts, or only your design, metadata and server connection information.
Execute AquaScripts
Execute AquaScripts with Ctrl+E. Invoke the debugger using Ctrl+Alt+Enter. The debugger allows you to step through, pause and set breakpoints in the code. The debugger highlights the breakpoints and indicates which breakpoint paused the execution. This makes it easy to evaluate variables and conditional flow of code.
Trend Lines, Reference Lines and Box Plots
Random looking plots resulting from granular data can be better interpreted by using trend lines, reference lines and box plots. Trend lines fit a line that best represents the pattern contained within detailed data plots. Reference lines, bands, distributions and box plots offer a quick and convenient way to compare multiple data sets against a central theme and to assess the impact of groups of data points within a single set.
Debug in Browser
The AquaScript Editor debugs an AquaScript in a browser with Aqua Data Studio’s embedded web server. Form input and page interaction within this browser can dynamically interact with your AquaScripts.
Table Calculations
Table calculations allow you to add data to your worksheet with formulas that work on the data of your visualization. Create calculations of moving averages, running totals, percent of total and other custom calculations to better analyze your data and make more accurate decisions. Sort table calculations vertically or horizontally for cells showing a percentage, a rank, or a percentile. Other table calculations can be sorted in a perpendicular direction. View the table calculation formula using the calculated field dialog, and convert existing table calculations into calculated fields.
Export AquaProject
AquaProjects can be exported to disk as zip files.
Version Control Integration
Aqua Data Studio provides integration of AquaProjects with several Version Control Systems like CVS, Subversion (SVN), Git and Perforce. AquaScripts associated with a version control repository can be edited and saved in the AquaScripts Editor.

List of Aqua Data Studio/Server Open APIs
JavaDoc for OpenAPI

com.aquafold.openapi.archive – A set of methods and algorithms to archive files
com.aquafold.openapi.chart – A set of methods for rendering charts
com.aquafold.openapi.compare – A set of methods for comparing files, directories and schemas
com.aquafold.openapi.crypto – A set of cryptographic functions
com.aquafold.openapi.data – A set of functions for working with data grids and pivot tables
com.aquafold.openapi.filesystem – A set of functions for accessing and managing computer file systems
com.aquafold.openapi.form – A set of methods for implementing HTML forms
com.aquafold.openapi.io – A set of methods for reading and writing in TXT, HTML and Excel formats
com.aquafold.openapi.mail – A set of methods for sending and receiving e-mails
com.aquafold.openapi.math – A set of mathematical and statistical functions
com.aquafold.openapi.net – A set of networking methods
com.aquafold.openapi.project – A set of methods which abstract the resources in the Aqua Project so that they may be accessed programmatically and identically in Aqua Data Studio
com.aquafold.openapi.random – A set of random data generators
com.aquafold.openapi.rdbms – A set of methods for accessing various types of databases
com.aquafold.openapi.rdbms.schema – A set of methods for manipulating database objects
com.aquafold.openapi.rdbms.util – A set of methods for parsing and formatting SQL statements
com.aquafold.openapi.report – A set of methods for database querying and reporting
com.aquafold.openapi.type – A set of methods for data manipulation and validation for various data types
com.aquafold.openapi.util – A set of convenient methods for development and debugging
com.aquafold.openapi.vcs – A set of methods for working with Git, Perforce, CVS and Subversion version management systems

References

1. ^ Rhino (JavaScript engine) Wikipedia article. Rhino is an open source JavaScript engine. 2. ^ JavaScript Wikipedia article. JavaScript is a prototype-based scripting language that is dynamic, weakly typed and has first-class functions. 3. ^ DDL (Data Definition Language) Wikipedia article. A data definition language or data description language (DDL) is a syntax similar to a computer programming language for defining data structures, especially database schemas..
Ads Logo in White

Join our mailing list

Copyright © 2001 – 2026 Aqua Data Studio, Inc. All rights reserved.