Hi Martin,
thanks for diagnosing a bit more. We did the same, and this is the gist:
- The web query form uses ADQL, and "ROUND" is a reserved keyword in ADQL, but our implementation doesn't have it.
- When you use the datalab command line client, or the queryClient python package, you can submit a query as Postgres SQL (which is the default), and that does support ROUND(). But, curiously, the ROUND() function expects the first argument to be 'numeric', so one has to cast it as such. Meaning, this works:
from dl import queryClient as qc
print(qc.query(sql='SELECT ra, CAST(ra AS numeric(10,7)) AS ra_numeric, ROUND(CAST(ra AS numeric),4) AS ra_round FROM nsc_dr2.object LIMIT 3'))
ra,ra_numeric,ra_round
-8.972056466339541,-8.9720565,-8.9721
-8.960232627460641,-8.9602326,-8.9602
-8.956693787104939,-8.9566938,-8.9567
I.e., you might as well stick with just the "CAST AS NUMERIC(10,7)" or so.
Cheers,
Robert