Hello,
I am trying to crossmatch a set of observations with the phat_v2.phot_mod table. Below, is my query. I've been able to run this type of query in the past but now datalab is throwing a timeout error after 5 minutes. I've also tried to run it async in python using jobid = qc.query(sql=sql_query, async_=True)
but I get "ERROR" when I check the job status with qc.status(jobid). Any assistance on what I could do next would be greatly appreciated.
dist = 0.00003056 # 0.11 arcsec
sql_query = f"""
SELECT
s.id, s.ra AS alert_ra, s.dec AS alert_dec,
p.ra AS pmod_ra, p.dec AS pmod_dec, p.*,
q3c_dist(s.ra, s.dec, p.ra, p.dec) AS dist_deg
FROM
mydb://alerts_tab_v2 AS s
JOIN
phat_v2.phot_mod AS p
ON
q3c_join(s.ra, s.dec, p.ra, p.dec, {dist})
ORDER BY s.ra, s.dec, p.f814w_vega
"""
result = qc.query(sql=sql_query, fmt='pandas')