0 votes
72 views

I have a query that works fine with async_=False, but immediately errors when async_=True. Is there a problem with the query, or is there some other issue?

big_q = """
SELECT quick_object_id, ra, dec, mag_psf_g, mag_psf_i
FROM delve_dr2.objects
WHERE 
mag_psf_g < 24. AND magerr_psf_g < 0.2
AND (mag_psf_g - mag_psf_i) < 1.5
AND extended_class_g <= 1 AND extended_class_i <= 1 
AND extended_class_g > -1 AND extended_class_i > -1
AND random_id < 1
"""

# This works fine:

test = qc.query(sql=big_q, async_=False, verbose=1, fmt='table') 

# This throws an error:

test2 = qc.query(sql=big_q, async_=True, verbose=1, timeout=86400, fmt='table')

EXECUTING
Status = ERROR; elapsed time: 1, timeout in 86399
Retrieving error
asked Nov 23, 2022 by Adrian | 72 views

1 Answer

0 votes
Best answer
Async queries are run through our TAP service and the ADQL parser requires floating-point numbers to include values right of the decimal.  So, your "mag_psf_g < 24." should use 24.0 instead and the query should run.  Let us know if you continue to have problems.
answered Nov 23, 2022 by datalab (19,200 points)

359 questions

372 answers

385 comments

2,427 users

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