The Administrator defines a number of things e.g:
The normal flow when defining a new query is:
- Queries and Query Parameters
- Users and User Privileges
- Target Datasources
Follow the Quick Start link to learn how to share database content in a few screenshots.
- Obtain the plain SQL statement and identify parameters
- If the target datasource is not already defined, define it (make sure the jdbc driver is in your application server path)
- If new queries are needed to retrieve list of values (LOV) - in order to dynamically build parameter value lists - define them
- Define the query and the query parameters
- Modify user privileges in order to allow users to execute the query
A detailed manual for Administrators is available with the application, or on the ART Wiki
An ART query is composed of two parts:
What do you need to deploy an SQL query using ART?
- Header and Source (SQL): The header contains query properties like Name, Type, Group, Description, Target database etc. The Type field determines if the output is tabular, crosstab, chart etc. The Source is an SQL statement where some labels (in the WHERE part) may be substituted by parameters values. An xml-style syntax can be used to create dynamic SQL code.
- Parameters: Before executing a query, users are prompted to enter query parameters. The values could be strings, numbers, dates or values picked from a dynamic pop-up list.
Just substitute parameters with labels and paste the SQL code:
SELECT COL1, COL2
WHERE COL3 LIKE #param#
To create SQL queries, you can use your preferred query tool (Tora, Toad, SQL Analyzer, dbcat, etc.).
ART Text Query
A Text Query is an html fragment that can be edited by authorized users via a WYSIWYG web-based editor. It is mainly used to provide descriptive sections in dashboards, but you can easily find how to use it as a simple CMS.
A Query or a Text Query can be considered as a portlet, i.e. an independent embeddable frame. The ART Dashboard allows grouping of portlets within a single page - simulating a JSR-168 style portal. This enables quick grouping of result sets and display metrics in a single screen.
How difficult is it to create a dashboard to embed some existing queries/graphs?
Just get the IDs of the queries and instead of typing the SQL code, specify a simple xml fragment like the one below:
This will create a two column dashboard, with two queries in the left column and one in the right column. The last query autorefreshes its content every 30 seconds, while the second starts minimized.