[Ops] Test queries from registry

Mark Taylor m.b.taylor at bristol.ac.uk
Tue Jun 8 12:12:53 CEST 2021


Hi all,

during the DAL/Ops session at the recent interop, there was some
discussion of how service validators could construct suitable test
queries for positional services using hints from the service registrations,
for instance to make sure that the validators are querying the sky
in a region for which the queried service has coverage.
I think(?) that the PADC or Euro-VO validators currently just pick
a fixed position (0,0?) for SCS/SIA/SSA queries.
and I don't know how universally data providers fill in this information
in their registrations, but this post is to summarise how it can be done.

The relevant information is in the "testQuery and the Query Type"
subsections of SimpleDALRegExt
(https://www.ivoa.net/documents/SimpleDALRegExt/)
which explains what test query information is registered for SCS/SIA/SSA,
and in Appendix A of RegTAP (https://www.ivoa.net/documents/RegTAP/)
which gives (the non-obvious) details of how to extract this
information from the rr.res_detail table.

The trick is to use the detail_xpath keys given in RegTAP Appendix A
to pull out the various values required from rr.res_detail.
A couple of examples follow.

Find test RA for a given SCS service:

   select ivoid, detail_value as ra
   from rr.res_detail
   where detail_xpath = '/capability/testQuery/ra'
   and ivoid = 'ivo://arches/3xmme/cs'

Retrieve all test information for a given service (additional filtering
using detail_xpath required on the result):

   select detail_xpath, detail_value
   from rr.res_detail
   where detail_xpath LIKE '/capability/testQuery/%'
   and ivoid = 'ivo://eso.org/ssap'

Find all test RA, Dec, SR for SCS services in one query:

   select ivoid,
          test_ra.detail_value as ra,
          test_dec.detail_value as dec,
          test_siz.detail_value as siz
   from (select ivoid, detail_value
         from rr.res_detail
         where detail_xpath = '/capability/testQuery/ra') as test_ra
   join (select ivoid, detail_value
         from rr.res_detail
         where detail_xpath = '/capability/testQuery/dec') as test_dec
   using (ivoid)
   join (select ivoid, detail_value
         from rr.res_detail
         where detail_xpath = '/capability/testQuery/sr') as test_siz
   using (ivoid)
   order by ivoid

It would be good if the validators could use this information for
test queries if they don't already, and services could fill in
this information in their registrations if they don't already;
that ought to lead to more robust validation results.

Mark

--
Mark Taylor  Astronomical Programmer  Physics, Bristol University, UK
m.b.taylor at bristol.ac.uk          http://www.star.bristol.ac.uk/~mbt/


More information about the ops mailing list