Thank you! FYI, I found another case where something breaks when using async_=True. This works:
sub_query = f"""
SELECT id
FROM nsc_dr2.object
WHERE 't' = Q3C_RADIAL_QUERY(ra, dec, 80.89, -69.76, 5)
AND class_star > 0.9
LIMIT 1000
"""
query = f"""
SELECT objectid, mjd
FROM nsc_dr2.meas
WHERE objectid IN ({sub_query})
"""
But this does not:
sub_query = f"""
SELECT id
FROM nsc_dr2.object
WHERE 't' = Q3C_RADIAL_QUERY(ra, dec, 80.89, -69.76, 5)
AND class_star > 0.9
LIMIT 1000
"""
query = f"""
SELECT objectid, mjd
FROM (SELECT *
FROM nsc_dr2.meas
WHERE objectid IN ({sub_query}))
"""
These are effectively the same but in the second case I nested another query where I select all the columns and then select only 2 columns with the outer SELECT. I wanted to use this format to do an INNER JOIN like so:
query = f"""
SELECT M.objectid, M.mjd, E.exptime
FROM
(SELECT *
FROM nsc_dr2.meas
WHERE objectid IN ({sub_query})) AS M
INNER JOIN nsc_dr2.exposure AS E
ON M.exposure = E.exposure
"""
I am still relatively new to SQL and DataLab so if this is all just user error and I am misusing the tools or writing bad queries, please let me know!