STILTS-TAPQUERY(1) | Stilts commands | STILTS-TAPQUERY(1) |
NAME¶
stilts-tapquery - Queries a Table Access Protocol server
SYNOPSIS¶
stilts tapquery [nupload=<count>] [ufmtN=<in-format>] [uploadN=<tableN>] [ucmdN=<cmds>] [ocmd=<cmds>] [omode=out|meta|stats|count|checksum|cgi|discard|topcat|samp|tosql|gui] [out=<out-table>] [ofmt=<out-format>] [upnameN=<adql-identifier>] [tapurl=<url-value>] [interface=tap1.0|tap1.1|cap] [auth=true|false] [adql=<query-text>] [parse=true|false] [sync=true|false] [maxrec=<nrow>] [destruction=<iso8601>] [executionduration=<seconds>] [compress=true|false] [upvotformat=TABLEDATA|BINARY|BINARY2] [language=<lang-name>] [poll=<millisec>] [progress=true|false] [delete=finished|never|always|now]
DESCRIPTION¶
tapquery can query remote databases using the Table Access Protocol (TAP) services by submitting Astronomical Data Query Language (ADQL) queries to them and retrieving the results. TAP and ADQL are Virtual Observatory protocols.
Queries can be submitted in either synchronous or asynchronous mode, as determined by the sync parameter. In asynchronous mode, if the query has not been deleted by the time the command exits (see the delete parameter), the result can be picked up at a later stage using the tapresume command.
Table uploads are supported, so it is possible (if the service supports this functionality), to upload a local table to the remote database, perform a query involving it, such as a join with a remote table of some sort, and receive the result. This powerful facility gives you crossmatches between local and remote tables.
For services that require authentication, you will need to supply your credentials as described in SUN/256. Otherwise, queries will be submitted anonymously by default, but you can force a login attempt to services with optional authentication by setting auth=true.
This command does not provide any facility for querying the service for either table or capability metadata, so you will need to know about the service capabilities and database structure from some other source (possibly TOPCAT).
OPTIONS¶
- A filename.
- A URL.
- The special value "-", meaning standard input. In this case the input format must be given explicitly using the ufmtN parameter. Note that not all formats can be streamed in this way.
- A scheme specification of the form :<scheme-name>:<scheme-args>.
- A system command line with either a "<" character at the start, or a "|" character at the end ("<syscmd" or "syscmd|"). This executes the given pipeline and reads from its standard output. This will probably only work on unix-like systems.
In any case, compressed data in one of the supported compression formats (gzip, Unix compress or bzip2) will be decompressed transparently.
Commands may alternatively be supplied in an external file, by using the indirection character '@'. Thus a value of "@filename" causes the file filename to be read for a list of filter commands to execute. The commands in the file may be separated by newline characters and/or semicolons, and lines which are blank or which start with a '#' character are ignored. A backslash character '\fR' at the end of a line joins it with the following line.
Commands may alternatively be supplied in an external file, by using the indirection character '@'. Thus a value of "@filename" causes the file filename to be read for a list of filter commands to execute. The commands in the file may be separated by newline characters and/or semicolons, and lines which are blank or which start with a '#' character are ignored. A backslash character '\fR' at the end of a line joins it with the following line.
Possible values are
- out
- meta
- stats
- count
- checksum
- cgi
- discard
- topcat
- samp
- tosql
- gui
Use the help=omode flag or see SUN/256 for more information.
This parameter must only be given if omode has its default value of "out".
This parameter must only be given if omode has its default value of "out".
The value must syntactically be an ADQL identifier ([A-Za-z][A-Za-z0-9_]*).
In the usual case, the default values of the various endpoints (sync and async query submission, tables metadata, service-provided examples etc) use this URL as a parent and append standard sub-paths.
In some cases however, determination of the endpoints is more complicated, as determined by the interface parameter which may cause endpoints to be read from the capabilities document at tapurl/capabilities, and by other endpoint-specific parameters (syncurl, asyncurl, tablesurl, capabilitiesurl, availabilityurl, examplesurl) for fine tuning.
- TAP1.0: The standard TAP endpoints are used, without examining the service's capabilities document. The service is queried using version 1.0 of the TAP protocol.
- TAP1.1: The standard TAP endpoints are used, without examining the service's capabilities document. The service is queried using version 1.1 of the TAP protocol.
- cap: The service's capabilities document is examined, and the endpoints listed there are used.
The capabilities document, if used, is read from tapurl/capabilities unless the capabilitiesurl parameter is defined, in which case that is used.
The baseline value of all the TAP service endpoints (sync, async, tables, capabilities, examples) are determined by this parameter, but each of those endpoint values may be overridden individually by other endpoint-specific parameters (syncurl, asyncurl, tablesurl, capabilitiesurl, availabilityurl, examplesurl)
For default (unauthenticated) access, the default value is usually suitable.
To use this option in non-interactive contexts, you may want to use the auth.username and auth.password system properties.
The supplied value should be an ISO-8601-like string, giving the new requested job destruction time. The service is not obliged to honour this request. See UWS v1.0, sec 2.2.3.3.
The supplied value is an integer giving the maximum number of wall-clock seconds for which the job is permitted to execute before being forcibly terminated. A value of zero indicates unlimited duration. The service is not obliged to honour this request. See UWS v1.0, sec 2.2.3.4.
Possible values:
- finished: delete only if the job finished, successfully or not
- never: do not delete
- always: delete on command exit
- now: delete and return immediately
SEE ALSO¶
If the package stilts-doc is installed, the full documentation
SUN/256 is available in HTML format:
file:///usr/share/doc/stilts/sun256/index.html
VERSION¶
STILTS version 3.5-debian
This is the Debian version of Stilts, which lack the support of
some file formats and network protocols. For differences see
file:///usr/share/doc/stilts/README.Debian
AUTHOR¶
Mark Taylor (Bristol University)
Mar 2017 |