Query interface – explained
Here you’ll find a detailed explanation to the query interface.
Submit SQL Query
Gaia@AIP hosts the data from Gaia data releases in a PostgresQL database. The data can be queried directly using the Astronomical Data Query Language (ADQL) or the Postgres flavour of SQL (Structured Query Language).
Here you’ll find the detailed explanation how to use the Query interface.
Submit a new job
- Open the Query interface in a browser window.
- Insert your SQL query in the text area SQL query or choose an example query from the Examples tab top right in the interface (just double click on one of them) above the text area.
- Click Submit new SQL Query botton to submit your job.
Addtionaly, you can give the result table a name in the Table name text field and sort the job into a “folder” with the Run id field. The queries can be either in ADQL or PostgreSQL which are closer explained here. The job is submitted into one of the job Queue: 30 seconds for a short test query, 5 minute for short jobs, 2 hours for long ones.
Above the text area, you can find the Schema and the Columns browser.This is very useful to find out which columns exist for which table in which database. Hover with the mouse over the columns for a short description. You will also find your user database and your uploaded tables in the browser. You can join tables from your private database with each other or the datasets.
Simbad and VizieR
Gaia@AIP connects to the Simbad and VizieR services for cross-identification of objects, so the coordinates can be retrieved and used in the SQL queries.
Results of a query job
You can view your results by clicking on the table name for your job in the Job list and then choosing the Results table tab.
Back in the Job overview tab, you can review again which query was executed, its Job parameters such time and size of the resulting tables etc.
It is also possible to Rename your the job’s result table or run id or to Archive the job completely using the links just below the Job parameters.
The Plot tab provides a simple plot-interface. The results can be downloaded via the Download tab. The result files can be downloaded as CSV or IVOA VOTable XML files.
After a successful job submission, your job will appear in the Job list bar on the left. Its name corresponds to the result-table name, which is either the current time stamp or a name that you have provided in the Table name field.
The query describes sky position and an angular distance, defining a cone on the sky. It is translated into the PostgresQL query with the same parameters and the results are served as a result table and stored in you Private database.
The uploaded tables can be queried like any other database using
SELECT statements. You can also browse the available tables and their columns using the “Database Browser” below the Query Form or referring to
<table_name> is the name of the table to provided during upload.