0 votes
866 views
by schech (140 points) | 866 views

2 Answers

0 votes

Hi, with the minimal example below I can not reproduce the error that you report:

from dl import authClient as ac, queryClient as qc
from dl.helpers.utils import convert
token = ac.login('anonymous')
query = 'SELECT coadd_object_id, ra, dec, w1mpro, w2mpro FROM des_dr1.des_allwise WHERE w2mpro < 15.6 AND 0.2 < (w1mpro - w2mpro)'
result = qc.query(token,query)
df = convert(result,'pandas')
print(df.head())

This prints:

   coadd_object_id         ra        dec  w1mpro  w2mpro
0        365874111  53.835287 -23.136150  15.419  15.215
1        365872277  53.837476 -23.102668  15.153  14.936
2        369433639  53.886171 -23.210287  16.364  15.481
3        365875473  53.854954 -23.162378  15.412  15.095
4        369436438  53.943101 -23.238697  15.632  15.359

Would you mind pasting here your minimal example? Thanks!

by
I am using the web query, not a query client.
Here is what I paste into the dialog box.

SELECT coadd_object_id, ra, dec, w1mpro, w2mpro FROM des_dr1.des_allwise WHERE w2mpro < 15.6 AND 0.2 < (w1mpro - w2mpro)

Interestingly the process seems to continue a long time after the error appears.
I wonder if processing stops if it simply skips that line.
Aha, the output table doesn't have the w1mpro and w2mpro values.

Here is the error message from the web interface:

Error: IllegalArgumentException: net.sf.jsqlparser.JSQLParserException JSQLParserException: ParseException: Encountered "," at line 1, column 15. Was expecting one of: "NULL" ... "CASE" ... "REPLACE" ... <S_DOUBLE> ... <S_INTEGER> ... <S_IDENTIFIER> ... <S_CHAR_LITERAL> ... <S_QUOTED_IDENTIFIER> ... "(" ... "*" ... "?" ... "+" ... "-" ... "{d" ... "{t" ... "{ts" ... "{fn" ...
0 votes

From the database logs I found the query:

SELECT coadd_object_id,, ra, dec, w1mpro, w2mpro FROM des_dr1.des_allwise WHERE w2mpro < 15.6 AND 0.2 < (w1mpro - w2mpro)

i.e. the error is a double-comma following the 'coadd_object_id' field.

by datalab (21.6k points)
This is what I cut and pasted into the web query.  
I did it again just to be certain.  No double comma.
Sorry to be a nuisance, I'm just beginning this SQL stuff and trying to
make sense of it.

SELECT coadd_object_id, ra, dec, w1mpro, w2mpro FROM des_dr1.des_allwise WHERE w2mpro < 15.6 AND 0.2 < (w1mpro - w2mpro)

453 questions

465 answers

474 comments

659 users

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

Categories