Next Previous Up Contents
Next: Select Service tab
Up: VO Data Access Windows
Previous: Multiple SSA Query

### A.9.8 Table Access Protocol (TAP) Query

Table Access Protocol Window

The Table Access Protocol (TAP) load window can be opened using the TAP Query button () from the Load Window's toolbar or the Control Window's VO menu. It allows you to use the TAP protocol to make freeform queries of remote database services using an SQL-like language. This is a powerful capability, giving you full access to remote data holdings; it's similar to systems like SDSS's CasJobs, but using the IVOA-endorsed TAP standard means that you can use the same interface for many different remote datasets.

TAP is more involved than the other VO protocols implemented by TOPCAT, and this window is correspondingly more complicated than the Cone, SIA and SSA dialogues, though it does share some features with them.

In order to interrogate the remote database you will have to write queries in Astronomical Data Query Language (ADQL). This is a powerful tool, but to do complicated things in it is not trivial. ADQL is essentially a particular dialect of SQL, so if you know SQL already, you should be able to write ADQL queries. If you have used systems like SDSS's CasJobs, the concept should be quite familiar. A tutorial on writing ADQL/SQL is beyond the scope of this manual, but the Enter Query tab provides an Examples menu which will give you a good start in using it. You can find a nice introduction written by Markus Demleitner of GAVO at http://docs.g-vo.org/adql.

Once your query is written, you can submit it in either synchronous or asynchronous mode. Synchronous queries begin to execute right away and must be relatively short; asynchronous queries are submitted to a server, run for a potentially long time, and retrieve the result later.

The window is composed of four tabs, of which you can see one at a time. You will use two or three of them when submitting a TAP query. Each tab is described in more detail in the following subsections, but an overview of their operation is like this:

Select Service tab
  Chooses the TAP service you wish to query, either using a registry search or by entering the service URL directly. Once you have chosen a service you can move to the Enter Query tab.
Enter Query tab
  Displays information about the service and the tables it holds, and allows you to enter the text of the query and submit the job. If the job is submitted synchronously, load will begin directly, but in the asynchronous case, you will move to the Running Jobs tab.
Running Jobs tab
  Shows a list of the asynchronous query jobs you have submitted, with details on their progress.
Resume Job tab
  Optionally allows you to resume an asynchronous query started in some earlier session.

When you first visit this window, the Select Service tab will be visible, and when an asynchronous query has been submitted the Running Jobs tab will be visible. If you want to submit another query to the same service, or use a different service, just select Enter Query or Select Service respectively, by clicking on the appropriate tab at the top.

This window offers one menu additional to the standard VO windows menus:

Deletion menu
  Allows you to choose when asynchronously submitted jobs will by default be deleted from the server. Once they are deleted they will no longer be visible in the Running Jobs tab. If they are not deleted in this way, they will stay on the server until they are deleted according to the server's deletion policy. Choose one of the available options:
  - On Completion: deleted when it has completed with either success or error status
  - On Exit: deleted when TOPCAT shuts down
  - Never: not deleted (except according to server policy)
  You can override these settings once a job has started by using the controls at the bottom of the running jobs tab. The settings in this menu affect the default value of the Delete On Exit checkbox. If you want to resume the job in a later session, you'll have to make sure that the job is not deleted on completion or exit.

The additional menu items are:

: Stay Open
  Makes sure that the window is not automatically closed after it loads a table.
: Reload
  Reloads information displayed in the window from the server. This may be updating job status information or reloading table or service metadata; the exact behaviour depends on which tab is currently visible.

Note: The TAP dialogue has been introduced at version 3.8 of TOPCAT, at a time when most available TAP services are quite new and may not fully conform to the standard, and usage patterns are still settling down. For this reason you may find that some TAP services visible do not behave quite as expected; it is also possible that in future versions the user interface will change in line with changing service profiles or in the light of user experience.

- A.9.8.1 Select Service tab
- A.9.8.2 Enter Query tab
- A.9.8.3 Running Jobs tab
- A.9.8.4 Resume Job tab

Next Previous Up Contents
Next: Select Service tab
Up: VO Data Access Windows
Previous: Multiple SSA Query

TOPCAT - Tool for OPerations on Catalogues And Tables
Starlink User Note253
TOPCAT web page: http://www.starlink.ac.uk/topcat/
Author email: m.b.taylor@bristol.ac.uk
Mailing list: topcat-user@bristol.ac.uk