Zoomdata / edc-cratedb

Apache License 2.0
4 stars 7 forks source link

Error on querying uppercase columns #19

Open christianbader opened 7 years ago

christianbader commented 7 years ago

When a datasource is added that contains uppercase "fields" e.g.: CITY - loading a chart fails with the following error:

"ExecuteException(message:io.crate.shade.org.postgresql.util.PSQLException: ERROR: ColumnUnknownException: Column city unknown)"

I guess this is caused due to a missing quotation when querying CrateDB since a direct query to CrateDB without the quotation would fail with the same error.

E.g.: SELECT CITY FROM address GROUP BY CITY ; Must be written as: SELECT "CITY" FROM address GROUP BY "CITY" ; in order to work.

My current workaround is to use a custom query with an alias like:

SELECT "CITY" as city FROM address GROUP BY city