0 votes
117 views

I uploaded one list to mydb 'legtest'

I can see it in Jupyter notebook:

> print (qc.mydb_list('legtest'))        
> print (qc.mydb_list('mydb://legtest'))        

which returns      legs_ls_id,bigint,

I can also see the contents by

> df1=convert(qc.query(sql="select * from mydb://legtest"))
> df1

But I cannot run a query with it

query = 'select top 10 * from mydb://legtest'
try:
    qc.query(adql=query, fmt='csv', out='mydb://testout')
except Exception as e:
    print(e.message)

I got 
Error: IllegalArgumentException: Table [ mydb."legtest" ] is not found in TapSchema

Eventually, I intend to do something like 

select a.*  from ls_dr9.tractor_s as a,    mydb://legtest as b  where a.ls_id = b.legs_ls_id

How can I use a table in mydb in select?
asked Apr 27, 2022 by anonymous | 117 views

1 Answer

0 votes

Hi, thanks for reaching out. Please try SQL (not ADQL) syntax, i.e.:

query = 'select * from mydb://legtest limit 10'
qc.query(sql=query, fmt='csv', out='mydb://testout')

Best,
Robert

answered Apr 28, 2022 by robertdemo (5,160 points)

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.