0 votes
28 views
My query (using python interface) timed out, so I tried specifying async=True.   It then returned with "Error in query().  Try checking that you are logged in."     Do I need to be logged in as something other than anonymous?    I then tried to create an account, following instructions in one of your Jupyter notebooks.   I apparently successfully created a user (jrbogart), but logged out or got logged out somehow and the password I thought I used is not recognized.

The query was "select distinct (ring256 / 64) as ring32 from lsst_sim.simdr2".   I tried several variants:   with and without "distinct",  submitted with sql= or with adql=  and so forth.
by | 28 views

1 Answer

0 votes

Thanks for reaching out. If you need to be logged in, use

from getpass import getpass
from dl import authClient as ac
token = ac.login(input("username:"),getpass("password:"))

You only have to do it when the token has expired or when you have explicitly logged out.

Note that synchronous queries can run up to 10 minutes (with optional argument 'timeout=600'), whereas 'async_=True' queries can run up to 24 hours (also note the underscore character in 'async_').
Please check also our User Manual:

https://datalab.noirlab.edu/docs/manual/UsingAstroDataLab/ClientInterfaces/QueryClient/QueryClient.html?highlight=async

and example notebooks, for instance:

https://github.com/astro-datalab/notebooks-latest/blob/master/04_HowTos/QueryClient/How_to_use_the_Data_Lab_QueryClient.ipynb

on how to use async queries (the call returns a jobID, and you have to check on the job status from time to time, and when it says COMPLETED, you can retrieve the results.

by datalab (21.8k points)

460 questions

473 answers

475 comments

662 users

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

Categories