![]() |
Science With the Virtual Observatory |
The exercises presented here are companions to the presentation ADQL (PDF, PPT).
In this presentation, we'll look at the tools from the ADQL library
that comes with in your summer school software package. If you sat
through the Advanced XML Technologies and
followed the exercises, then you do not have to rebuild
the library. If you missed that session, then building
is easy; just change into the adqllib package directory and run
ant
:
on Linux/MacOS:
cd $NVOSS_HOME/java/src/adqllib ant |
on Windows:
cd %NVOSS_HOME%\java\src\adqllib ant |
|
25 seconds or so later, you should see ant print "BUILD SUCCESSFUL" to
the screen. If you are Linux or MacOS, you might want to type
rehash
to ensure the new tools are available to you.
Through the slide talk we're going to look at various ADQL examples on the OpenSkyPortal query interface. In this light exercise, we're going to look at and discuss a few of the examples shown in the right-hand list.
Single Node Join: notice how this query does
the inner join between two tables at the same node. These two
tables share a common column in specobjid
.
XMatch/Region: Here we do a simple cross-match restricted over a region.
XMatch/Region 2: This query incorporates additional constraints into the cross match. In particular, it sets a color constraint formed across the databases.
Three Node Match: This includes a third database, USNO-B, that we don't want the source to appear in.
We'll now have a look at the adillib tools. If you haven't already,
change into the java/src/adqllib
directory. There you
will see a samples
directory. Change into the
samples/v0.7.4
:
on Linux/MacOS:
cd samples/v0.7.4 |
on Windows:
cd samples\v0.7.4 |
|
convertADQL
tool to convert
them to the other format.
To get the flavor of what ADQL/x looks like, open one of the files in this directory. Don't worry if this looks like nonsense to you.
To convert one of our samples to ADQL/s, type the following:
convertADQL -v v0.7.4 -x adql-circle.xml
If you wish, you can save the output to a file with the -o
option; then you can go the other way with the -s
option.
Try converting an ADQL/s query to ADQL/x:
convertADQL -v v0.7.4 -s adql-simple.sqlor
convertADQL -v v0.7.4 -S "SELECT a.* FROM Tab a"
Try composing your own ADQL/s queries and convert them using the above command-line pattern.
The NVO Summer School is made possible through the support of the National Science Foundation and the National Aeronautics and Space Administration.
![]() |
![]() |