0 votes
24 views

Hi, I am trying to query from des_dr1.galaxies and des_dr1.des_allwise. I get an error "Error: IllegalArgumentException: Table [ des_dr1.des_allwise ] is not found in TapSchema" . I notice "des_dr1.des_allwise" does not appear in the tree of tables.

Full query below, for reference:

select 
galaxies.coadd_object_id gal_id,
des_allwise.coadd_object_id as wise_id,
cntr,
deltawin_j2000 as gal_dec,
alphawin_j2000 as gal_ra,
des_allwise.dec as wise_dec,
des_allwise.ra as wise_ra,
mag_auto_g_dered as g,
magerr_auto_g as g_err,
mag_auto_r_dered as r,
magerr_auto_r as r_err,
mag_auto_i_dered as i, 
magerr_auto_i as i_err,
mag_auto_z_dered as z, 
magerr_auto_z as z_err,
mag_auto_y_dered as y,
magerr_auto_y as y_err,
w1mpro as w1,
w1sigmpro as w1_err,
w2mpro as w2,
w1sigmpro as w2_err
from des_dr1.galaxies
join des_dr1.des_allwise on galaxies.coadd_object_id=des_allwise.coadd_object_id
where (des_dec > -60 and des_dec < -4)
and (des_ra > 273 or des_ra < 105)
and mag_auto_g_dered < 90
and mag_auto_r_dered < 90
and mag_auto_i_dered < 90
and mag_auto_z_dered < 90
and mag_auto_y_dered < 90
and w1sigmpro<0.2 
and w2sigmpro<0.2 
and ( (mag_auto_z_dered-(w1mpro+2.699)) <= (1.37*mag_auto_g_dered-1.37*mag_auto_z_dered-0.02) ) 
and ( (mag_auto_z_dered-(w1mpro+2.699)) >= 2.0 )

asked Sep 22 by jemoor15 (150 points) | 24 views

1 Answer

0 votes
Best answer

Hi,

We recently replaced some of our "old-style" crossmatch tables with newer ones. The new one for des_dr1 and allwise is: des_dr1.x1p5__main__allwise__source. You can view the column information for this crossmatch table using the Table Browser on our website. Your query will then look something like this (in bold are the parts that changed):

select 
galaxies.coadd_object_id gal_id,
x1p5__main__allwise__source.id2 as wise_id,
deltawin_j2000 as gal_dec,
alphawin_j2000 as gal_ra,
x1p5__main__allwise__source.dec2 as wise_dec,
x1p5__main__allwise__source.ra2 as wise_ra,

mag_auto_g_dered as g,
magerr_auto_g as g_err,
mag_auto_r_dered as r,
magerr_auto_r as r_err,
mag_auto_i_dered as i, 
magerr_auto_i as i_err,
mag_auto_z_dered as z, 
magerr_auto_z as z_err,
mag_auto_y_dered as y,
magerr_auto_y as y_err,
w1mpro as w1,
w1sigmpro as w1_err,
w2mpro as w2,
w1sigmpro as w2_err
from des_dr1.galaxies
join des_dr1.x1p5__main__allwise__source on galaxies.coadd_object_id=x1p5__main__allwise__source.id1
join allwise.source on x1p5__main__allwise__source.id2=source.source_id

where (deltawin_j2000 > -60 and deltawin_j2000 < -4)
and (alphawin_j2000 > 273 or alphawin_j2000 < 105)

and mag_auto_g_dered < 90
and mag_auto_r_dered < 90
and mag_auto_i_dered < 90
and mag_auto_z_dered < 90
and mag_auto_y_dered < 90
and w1sigmpro<0.2 
and w2sigmpro<0.2 
and ( (mag_auto_z_dered-(w1mpro+2.699)) <= (1.37*mag_auto_g_dered-1.37*mag_auto_z_dered-0.02) ) 
and ( (mag_auto_z_dered-(w1mpro+2.699)) >= 2.0 )

answered Sep 22 by ajacques (520 points)
selected Sep 28 by jemoor15
Yes, this did the trick. Thank you so much!

271 questions

273 answers

311 comments

1,839 users

Welcome to Data Lab Help Desk, where you can ask questions and receive answers from other members of the community.