Data Central uses cookies to make your browsing experience better. By using Data Central you agree to its use of cookies. Learn more I agree

Documentation

Find information, examples, FAQs and extensive descriptions of the data, curated by the survey teams.

Docs ref

Reference

A complete guide to using Data Central
Feb. 1, 2018 by E. Mannering
Dec. 21, 2020, 5:19 a.m. J. Tocknell

Query Service

The query services allows users to submit a SQL or ADQL query to the Data Central database server, returning records that match some criteria from the GAMA, SAMI and GALAH catalogues. View and download the results.

Syntax

When constructing SQL/ADQL, it is important to adopt the correct syntax. Tables are addressed in the form:

SURVEY_DATARELEASE.TABLE

with a dot (.) as the delimiter. The group name is not included as part of the address. There are dozens of tables from multiple surveys in the Data Central data base, Groups are used to collect scientifically-related tables together, in order to help the user locate the correct table more quickly.

You can find the correct name for each table and column in the Schema Browser on the query page (see the name field highlighted in blue). For example, the GalacticExtinction table from the InputCat group from the GAMA second data release is addressed as:

gama_dr2.GalacticExtinction

ADQL

ADQL is based on the Structured Query Language (SQL), especially on SQL 92. Astronomical data is often stored in tabular data sets, making SQL a convenient access means. ADQL extends SQL 92 to include functions and geometries that are specific to astronomy.

The ADQL language has been defined by the IVOA in the Recommendation of 30 Oct 2008 (Version 2.0) and is mainly used in the Table Access Protocol (TAP).

A subset of the ADQL functions are supported by Data Central: 

  • CONTAINS returns 1 or 0
  • DISTANCE returns value in degrees
  • INTERSECTS returns 1 or 0

Example usage:

CONTAINS(POINT(<coordsystem>,<ra>,<dec>),CIRCLE(<coordsystem>,<ra>,<dec>,<radius>)) 
with ra, dec and radius in degrees.
Feb. 1, 2018 by E. Mannering
Dec. 21, 2020, 5:19 a.m. J. Tocknell