2009-12-01T10:00:00 virtual-observatories catalogs 10 \getConfig{web}{sitename}'s Table Access Protocol (TAP) service with table metadata. Schemas containing tables available for ADQL querying. 1 1 1 1
Tables available for ADQL querying.1 1 1 1 1 1 1 1
Columns in tables available for ADQL querying. 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Foreign key relationships between tables available for ADQL querying. 1 1 1 1 1
Columns participating in foreign key relationships between tables available for ADQL querying. 1 1 1
Columns that are part of groups within tables available for ADQL querying.
Standard data models supported by this service. This is a non-standard tap_schema table used by DaCHS in the creation of registry records. It is manipulated through gavo imp on tables with supportsModel and supportsModelURI properties.
rd = self.sourceToken yield ("schemas", { "schema_name": rd.schema, "schema_description": base.getMetaText(rd, "description"), "schema_utype": base.getMetaText(rd, "utype"), "schema_index": base.getMetaText(rd, "schema-rank")}) # the moribund property is set by external code if the # rd is to be removed from TAP_SCHEMA. The removal # is already done by the the newSource script in make # below, thus we only need to do nothing here. if rd.getProperty("moribund", False): return for table in rd.tables: if not table.adql or table.adql=="hidden": continue if table.viewStatement: tapTableType = "view" else: tapTableType = "table" yield ("tables", { "schema_name": rd.schema, "table_name": table.getQName().lower(), "table_description": base.getMetaText( table, "description", propagate=True), "table_type": tapTableType, "table_utype": base.getMetaText( table, "utype", propagate=False), "sourceRD": rd.sourceId, "nrows": table.nrows, "table_index": base.getMetaText(table, "table-rank"), }) schema_index: schema_index, schema_name: schema_name, description: schema_description, utype: schema_utype utype: table_utype, description: table_description rd = self.sourceToken if rd.getProperty("moribund", False): return for table in rd.tables: if not table.adql or table.adql=="hidden": continue yield { "sourceRD": rd.sourceId, "table_name": table.getQName().lower(), "dmname": table.getProperty("supportsModel", None), "dmivorn": table.getProperty("supportsModelURI", None), } if @dmname: for name, uri in ( zip(@dmname.split(","), @dmivorn.split())): yield { "sourceRD": @sourceRD, "dmname": name.strip(), "dmivorn": uri} from gavo.utils.typeconversions import sqltypeToVOTable rd = self.sourceToken if rd.getProperty("moribund", False): return for table in rd.tables: if not table.adql or table.adql=="hidden": continue for index, col in enumerate(table): if col.hidden: continue indexed = 0 if col.isIndexed(): indexed = 1 type, arraysize, xtype = sqltypeToVOTable(col.type) # xtype overrides -- if this becomes more common, we'll # have to change sqltypeToVOTable to take local xtypes # into account as well. # There's analogous code in registry.tableset. if col.xtype=='adql:REGION': type, arraysize, xtype = "char", "*", "adql:REGION" try: legacy_size = int(arraysize) except (TypeError, ValueError): legacy_size = None yield { "table_name": table.getQName().lower(), "column_name": col.getTAPName(), "description": col.description, "unit": col.unit, "ucd": col.ucd, "utype": col.utype, "xtype": xtype, "arraysize": arraysize, "datatype": type, "size": legacy_size, "principal": col.verbLevel<=20, "indexed": indexed, "std": parseInt(col.getProperty("std", "0")), "sourceRD": rd.sourceId, "column_index": index+1, } A non-standard (and not tap-accessible) table used for managing asynchronous TAP jobs. It is manipulated through TAP job creation and destruction internally. Under very special circumstances, operators can use the gavo admin cleantap command to purge jobs from this table. Note that such jobs have corresponding directories in $STATEDIR/uwsjobs, which will be orphaned if this table is manipulated through SQL.
ivo://\getConfig{ivoa}{authority}/tap \metaString{authority.shortName} TAP \getConfig{web}{sitename} TAP service `_, look for the bullet point on tap and follow the link to "this service". Then, click on "New job..." in the job list, enter your query, click "Set query", then "Execute query". Reload the page you are redirected to now and then to see when your job is finished, then retrieve the result. The queries this service executes are written an a dialect of SQL called ADQL. You need to learn it to use this service. See `our ADQL tutorial`_. Also do not miss the `local examples`_. By the way, for quick ad-hoc queries from within a browser, our `ADQL form service`_ may be more convenient than TAP. Also see the `table metadata`_ of the tables exposed here. Local information: This service may put a much lower limit on uploads in sync queries than advertised in the table metadata. Unfortunately, current TOPCAT versions don't give terribly helpful error messages when the server rejects a query because the attached upload is too large (something like “Error writing request body to server“). If that happens to you, just switch to asynchronous querying (in TOPCAT, that's in the “Mode” combo box just above the query editor). .. _TOPCAT: http://www.star.bris.ac.uk/~mbt/topcat/ .. _GAVO VOTable library: http://soft.g-vo.org/subpkgs .. _TAP shell: http://soft.g-vo.org/tapsh .. _pyVO: https://github.com/pyvirtobs/pyvo .. _table metadata: \internallink{__system__/dc_tables/list/form} .. _ADQL form service: \internallink{__system__/adql/query/form} .. _service doc of our ADQL form service: \internallink{__system__/adql/query/info} .. _our ADQL tutorial: http://docs.g-vo.org/adql .. _local examples: \internallink{__system__/tap/run/examples} .. _TAPHandle: http://saada.unistra.fr/taphandle/?url=\internallink{/tap} Issues ====== For information on our ADQL implementation, see the \RSTservicelink{__system__/adql/query/info}{ADQL service info}. If multiple output columns in a query would end up having the same name, in the output VOTable they are disambiguated by appending underscores. This is in violation of the specification, but since fixing it would require rather intrusive changes into our software and it is not clear why one should want to use names when they are not unique to begin with, this will probably not be fixed. ]]> \internallink{tap}