0 votes
351 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
by richardgmcmahon (200 points) | 351 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
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

by robertdemo (8.9k points)
edited by 226

449 questions

463 answers

473 comments

658 users

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

Categories