ADQL Validator

Check the correctness of your ADQL query.

Demo

This web page aims also to be a demonstration of what the ADQL library can do (parse ADQL, transform the query in a Java object tree and translate in SQL). So it is just a simple form to submit an ADQL query to the ADQL validator available on this website and to display properly the result of the validation.

Validator

The ADQL validator itself can be called with the following URL:
/adqltuto/adqlvalidate

Only 2 parameters can be provided: query and tables. tables is optional and is either a URL toward the tables list or a file containing the tables list. If this parameter is not provided, only the syntax is checked (not the tables and columns names).

Parameters may be provided either in GET or POST. If the tables list is given into a file, both parameters must be written in a POST multipart request (and then tables will contain the file content).

Tables list format

The validator lets you parse and validate an ADQL query over a given list of tables. If no tables list is provided, only the syntax of the query will be checked.

This list is an XML document following the schema VODataResource. The expected root node is tableSet. This document is exactly the same as the "tables" resource of a TAP service. Thus, you can easily have an example using any well implemented TAP service you know. A list of some known TAP services is provided in the form below.

ADQL query:


(optional) Tables and columns:

OR URL: OR a file:

    The same query you have written but in a SQL executable by PostgreSQL+PgSphere.

    
    

    The tree drawn below represents the syntactic tree generated by the ADQL library. In each node, you have the name of the Java class (with a link toward its Javadoc) and the name/type of the object. By clicking on a node, you can expand or collapse it and so show or hide its children.