SDSSQUERY - make direct Sloan SQL query
The sdssquery program, located in
/data/oiropt/bin,
is a small shell script that uses a Sloan-provided Python script to
send an SQL query to the SDSS SkyServer via the Web, returning the output
on STDOUT as a Starbase table.
The Skyserver has
row and time limits on this kind of Web query. Currently a query
will be aborted if it takes longer than 90 seconds or returns
more than 100,000 rows.
Example:
The command (split across lines for clarity - the command is a single line):
sdssquery '
select ra, dec, type, petroMag_r, petroMag_i
from PhotoPrimary
where type != 3 and
objID between 587727177912614921 and 587727177912614940
' |
justify
which produces:
ra dec type petroMag_r petroMag_i
----------- ---------- ---- ---------- ----------
4.107212E-3 -11.209926 6 16.707 16.534
6.990937E-3 -11.096008 6 10.823 12.727
0.012425 -11.098176 6 22.245 20.815
Note that when the SQL query has shell wildcard characters, it will have
to be quoted or the characters individually escaped.
[getobjid]
[getspecid]
[footserver]
[sdssquery]
|