0 votes
166 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?
by | 166 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

by robertdemo (8.0k points)

416 questions

433 answers

437 comments

636 users

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

Categories