I nternational

V irtual

O bservatory

A lliance

TAPRegExt: a VOResource Schema Extension for Describing TAP Services
Version 1.0

Filled in automatically

Working Groups:
Registry WG, DAL WG
This version:
filled in automatically
Latest version:
http://www.ivoa.net/Documents/TAPRegExt/
Previous versions:
http://www.ivoa.net/Documents/TAPRegExt/20110727
Authors:
Markus Demleitner
Patrick Dowler
Ray Plante
Guy Rixon
Mark Taylor

Abstract

This document describes an XML encoding standard for metadata about services implementing the table access protocol TAP [TAP], referred to as TAPRegExt. Instance documents are part of the service's registry record or can be obtained from the service itself. They deliver information to both humans and software on the languages, output formats, and upload methods supported by the service, as well as data models implemented by the exposed tables, optional language features, and certain limits enforced by the service.

Status of this Document

A list of current IVOA Recommendations and other technical documents can be found at http://www.ivoa.net/Documents/.

Acknowledgments

This document has been developed with support from the German Astronomical Virtual Observatory (BMBF Bewilligungsnummer 05A08VHA).

This document has borrowed extensively from StandardsRegExt [SRE] working drafts.

Syntax Notation Using XML Schema

This document defines the TAPRegExt schema using XML Schema [XSD]. The full schema document is listed in Appendix A. Parts of the schema appear within the main sections of this document; however, documentation nodes have been left out for the sake of brevity.

References to specific elements and types defined in the VOResource [VOR] schema include the namespace prefix, vr, as in vr:Resource (a type defined in the VOResource schema). References to specific elements and types defined in the TAPRegExt schema include the namespaces prefix, tr, as in tr:TableAccess (a type defined in the TAPRegExt schema). Use of the tr prefix in compliant instance documents is strongly recommended, particularly in applications that involve IVOA registries.

Contents

1. Introduction

The Table Access Protocol TAP [TAP] allows VO clients to send queries to remote database servers and receive the results in standard formats. In addition, it defines means to discover database schemata on the remote side, to upload data from the local disk or third-party hosts, and more. TAP builds upon a variety of other standards, premier among which is the Universal Worker Service [UWS], which describes how client and server can negotiate the execution of a query and the retrieval of results without having to maintain a continuous connection.

To accommodate a wide variety of requirements, the TAP specification offers implementors many choices on optional features, resource limits, or locally defined functionality. One purpose of TAPRegExt is to allow the service to communicate such choices to remote clients using the mechanisms laid down in the VO Service Interfaces standard [VOSI].

Clients also need to discover TAP services offering certain kinds of data. Central to this is the concept of a registry in which resources can be described and consequently discovered by users and applications in the VO. Registries receive resource descriptions as defined in the IVOA standard [VOR]. In this schema, support for a standard service protocol is described as a service's capability; the associated metadata is contained within the service resource description's <capability> element.

TAPRegExt defines this capability element for TAP services. In the context of registering TAP services, an important role filled by TAPRegExt is the communication of supported data models to the registry.

1.1. TAPRegExt within the VO Architecture

TAPRegExt within the VO architecture

Figure 1: IVOA Architecture diagram with TAPRegExt and the related standards marked up.

This specification directly relates to other IVOA standards in the following ways:

VOResource, v1.03 [VOR]
Descriptions of services that support TAP are encoded using the VOResource XML schema. TAPRegExt is an extension of the VOResource core schema.
TAP, v1.0 [TAP]
The TAP standard defines some of the concepts that TAPRegExt deals with. The TAP standard document indirectly refers to this document in the specification of its capabilities endpoint.
UWS, v1.0 [UWS]
The UWS standard describes additional parameters the choices of which are communicated using TAPRegExt.
StandardsRegExt [SRE]
TAPRegExt uses the StandardKeyEnumeration mechanism introduced in StandardsRegExt to define controlled vocabularies.

This standard also relates to other IVOA standards:

IVOA Support Interfaces, v1.0 [VOSI]
VOSI describes the standard interfaces to discover metadata about services; this document defines the response TAP services should provide on the capabilities endpoint described by VOSI.
IVOA defined data models
Data models specified by the IVOA can define the structure of database tables holding instances of those data models. The first example of such a definition is given by [ObsCore]. Services providing access to such tables can declare that fact within TAPRegExt instance documents.

2. The Extension

2.1. The Schema Namespace and Location

The namespace associated with TAPRegExt VOResource extensions is http://www.ivoa.net/xml/TAPRegExt/v1.0. Just like the namespace URI for the VOResource schema, the TAPRegExt namespace URI can be interpreted as a URL. Resolving it returns the XML schema document (given in Appendix A) that defines the TAPRegExt schema.

Authors of VOResource instance documents may choose to provide a location for the VOResource XML schema document and its extensions using the xsi:schemaLocation attribute. While generators are free to provide any schema location (e.g., a local mirror), this specification recommends using the TAPRegExt namespace URI as its location URL (as illustrated in the example above), as in,

xsi:schemaLocation="http://www.ivoa.net/xml/TAPRegExt/v1.0
                    http://www.ivoa.net/xml/TAPRegExt/v1.0"

Note that you must give the xsi:schemaLocation of the TAPRegExt schema when the capability defined here is part of a published registry resource record as per the IVOA Registry Interface standard [RI]. This does not apply to the use in a TAP server's capabilities endpoint.

2.3. Languages Supported

TAP services may offer a variety of query languages. In TAPRegExt, the language element allows the communication of what languages are available on a service. TAP defines values of the LANG parameter to have either the form <name>-<version> or the form <name>, where the latter form leaves the choice of the version to the server. Therefore, a language is defined using a name and one or more versions.

The recommended way to associate larger amounts of documentation with a language entry in a capability element is via registration of the language using the mechanisms defined in [SRE] and associating the registry record with the language element through the latter's ivo-id attribute. The IVORN for the only language mandatory for TAP services, ADQL 2.0, is ivo://ivoa.net/std/ADQL#v2.0.

The type of the ivo-id attribute on version is xs:anyURI as opposed to vr:IdentifierURI since the latter does not allow frament identifiers. This is fine when referring to complete standards (as for the dataModel above), but will not work when the entities referred to are members of, say, StandardsRegExt enumerations. Hence, we allow any URI in the schema for this attribute. The description constrains the value to be an IVORN, though. The same reasoning applies to the ivo-id attributes of outputFormat and uploadMethod.

Query languages may support optional features. For ADQL, the most prominent of those are user-defined functions, i.e., functions not defined in the language standard but added by the operators of the service, and geometry functions. Such optional features may be communicated to the service client in tr:languageFeatures elements.

Each such list is labelled with a type attribute indicating the type of language option being described. This string should be an IVORN whose semantics in this context, along with the semantics of the content of its descendant feature/form elements, can be documented in association with the language in question.

TAPRegExt itself defines the following feature types:

ivo://ivoa.net/std/TAPRegExt#features-udf

Each feature declares a user-defined ADQL (or similar) function supported. The content of the form element must be the signature of the function, written to match the signature nonterminal in the following grammar:

signature ::= <funcname> <arglist> "->" <type_name>
funcname ::= <regular_identifier>
arglist ::= "(" <arg> { "," <arg> } ")"
arg ::= <regular_identifier> <type_name>

The type_name nonterminal is not defined by the ADQL grammar. For the purposes of TAPRegExt, it is sufficient to assume it expands to "some sort of SQL type specifier" (which may include spaces and parentheses). For an enumeration of common types in ADQL, refer to the last column of the table in section 2.5 of [TAP].

Example:


  
    
match(pattern TEXT, string TEXT) -> INTEGER
match returns 1 if the POSIX regular expression pattern matches anything in string, 0 otherwise.
]]>
ivo://ivoa.net/std/TAPRegExt#features-adqlgeo

Each feature declares support for one of the geometry functions defined by ADQL (support for these functions is in general optional for ADQL implementations, though TAP imposes some constraints on what combinations of support are permitted).

The signature of these functions, where supported, is fixed by ADQL; the content of the form element is just the name of the function.

Example:

<feature>
  <form>CONTAINS</form>
</feature>

2.4. Output Formats

A TAP service may offer a variety of output formats. What output formats are available is defined using outputFormat elements. They declare a MIME type [RFC2045] as well as aliases (the shorthand forms the server also accepts in the FORMAT parameter). If desired, the format can be further described with an IVORN in the ivo-id attribute; TAPRegExt provides keys for some variants of VOTables which are not interoperably distinguishable by their MIME types so far:

output-votable-td
A VOTable in which all DATA elements contain a TABLEDATA element
output-votable-binary
A VOTable in which all DATA elements contain a STREAM element with a BINARY child
output-votable-binary2
A VOTable in which all DATA elements contain a STREAM element with a child of the yet-to-be-defined BINARY2 VOTable element

2.6. Resource Limits

TAP services usually impose certain limits on resource usage by clients, e.g., a maximum run time per query, or a maximum number of rows in the result set. Services assign such limits to newly created jobs and may allow raising the limits by means of queries or query parameters (e.g., the size of the result set is limited by the MAXREC parameter, whereas the date of job destruction may be changed by posting to the destruction parameter). Services may put some limit to how far the resource limitations may be raised.

TAPRegExt's capabilities element allows the declaration of such limits. These declarations are primarily intended for human consumption and should give conservative guidelines. Thus, the operators of a service implementing a complex, possibly dynamic limits policy should give lower estimates here.

If a service supports authentication and has different limits depending on what user is authenticated, it should return the limits applying to the logged user.

The resource limits applying to newly created jobs are given in default elements, the limits beyond which users cannot raise the limits are given in hard elements.

Note that the absence of a specification of limits does not imply that no limits are enforced.

Limits on Time

This document defines two time-like resource limits:

  • retentionPeriod -- the time from job creation until destruction.
  • executionDuration -- the maximal run time given to a query.

All values in time-like limits are given in seconds. Both retentionPeriod and executionDuration are of type tr:TimeLimits.

Limits on Data

Limits on data are expressed much like time limits in that they give default and a hard value as well. Both those values have a unit attribute that can either be byte or row for data limits.

This document defines two resource limits on data:

  • outputLimit -- if unit is row here, the default gives the value of TAP's MAXREC parameter the service will use when none is specified.
  • uploadLimit -- the maximum size of uploads. This is not a TAP adjustable parameter. The default value advises clients about the server's wishes as to a limit above which some sort of acknowledgement should be requested from the user. The hard limit gives the maximum size of an upload to the server.

Data limits are defined using the tr:DataLimits and tr:DataLimit types:

Changes from Previous Versions

References