0 votes
141 views

Hello again!

I am trying an async query using the example in the notebook:

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

query = 'SELECT count(*) FROM usno.b1'
result = qc.query(sql=query,async_=True,wait=True,poll=15,verbose=1)

This returns:

Error: The provided security token is invalid.
Status = Error: The provided security token is invalid.; elapsed time: 15, timeout in 285
Error: The provided security token is invalid.
Status = Error: The provided security token is invalid.; elapsed time: 30, timeout in 270
Error: The provided security token is invalid.
Status = Error: The provided security token is invalid.; elapsed time: 45, timeout in 255
Error: The provided security token is invalid.
Status = Error: The provided security token is invalid.; elapsed time: 60, timeout in 240
Error: The provided security token is invalid.

Am I supposed to login for async queries? Maybe that is the reason?

Best regards, Richard
asked Mar 20, 2022 by richardgmcmahon (200 points) | 141 views

2 Answers

0 votes
Ok, I have logged in on the command line using; datalab login and I now get:

EXECUTING
Status = EXECUTING; elapsed time: 10, timeout in 3590
answered Mar 21, 2022 by richardgmcmahon (200 points)
0 votes

Thanks for reaching out. It could be that your token is expired what whatever reason. Try to get a new one (in a notebook):

from dl import authClient as ac
from getpass import getpass
token = ac.login(input("Enter user name: "), getpass("Enter password: "))  # enter credentials, each time ending with ENTER

And now run your query again.

Please let us know whether that solved it for you or not. We'll help further if needed.

Best regards,

Robert

answered Mar 21, 2022 by robertdemo (5,160 points)
edited Mar 21, 2022 by robertdemo

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.