0 votes
90 views

Hi,

This is Huanian. I have created a database and there is a table there. But when I do the query test, it said the table does not exist. See below for the description.

print (qc.mydb_list('NearbyGalaxy'))              # Use of the 'mydb://' prefix is optional
print (qc.mydb_list('mydb://NearbyGalaxy'))

ra,double precision,
dec,double precision,
zgal,double precision,
mjd,integer,
plate,smallint,
fiber_id,smallint,
mag_g,double precision,
mag_r,double precision,
mag_z,double precision,
r50,double precision,
devab_r,double precision,
df1=convert(qc.query(sql="select * from mydb://NearbyGalaxy"))
queryClientError: Error: QM: MyDB table nearbygalaxy does not exist

I have no idea why that happens, since it worked very well last year. 

asked Dec 4, 2022 by anonymous | 90 views

1 Answer

+1 vote
The core problem is in the use of upper-case characters in the table name, these are only allowed when the table name is quoted and the quoting behavior has changed in recent updates.  I've created a copy of the table in your mydb with the all lower-case chars so the query should work now, and using lower-case names should avoid this in the future until the quoting bug is fixed in the next update.  Please let us know if you still have problems.
answered Dec 4, 2022 by datalab (19,200 points)
I got it and it worked well now. Thanks a lot.

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.