7. ADQL in STILTS

TAP is one of the VO protocols supported by STILTS: Performing an ADQL query with STILS could look like this:

	 STILTS tapquery \
	 tapurl='http://gaia.esac.esa.int/tap-server/tap' \
	 omode=out out=t1.vot \
	 ofmt=vot \
	 delete=never \
	 adql="SELECT \
	 TOP 10000 \
	 source_id, ra, dec, parallax, pmra, pmdec\
	  FROM tgas_source\
	 WHERE \
	 1=CONTAINS(POINT('ICRS', ra, dec),\
	 CIRCLE('ICRS', 56.75, 24.1167, 10.5 ))"

A brief explanation of the STILTS arguments:

  • tapquery calls the TAP query functions
  • tapurl is needed to identify the service that shall be queried
  • omode defines the outputmode. Here we chose VOTable.
  • out sets the file that shall contain the results
  • delete is used to set when a finished job shall be deleted on the server
  • adql is the ADQL query. By default, a STILTS TAP query is in asychronous mode. After starting the query STILTS will return a hyperlink pointing to the job on the remote service. If "delete=never"is set, this link can be used to return to the job at a later time and after the job has finished, to download the results.""


Hendrik Heinl

Copyright Notice