Error in FilterBox SQL Query using elasticsearch-dbapi 0.1.2/0.2.0 on Elasticsearch 7.x.x #19192
Unanswered
Polignao
asked this question in
Q&A / Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As the self explanatory title says, I'm getting this error when trying to use elasticsearch as database for a filterbox.
Superset versions I tested this on: 0.990-dev, 1.0.1
Superset is installed using Docker Desktop on Windows 10 19042.804
https://hub.docker.com/r/amancevice/superset/ for 1.0.1
https://hub.docker.com/r/apache/incubator-superset for 0.990-dev
Elasticsearch is in Docker too, following guide here:
https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html
WARNING:elasticsearch:POST http://host.docker.internal:9200/_sql/ [status:400 request:0.015s]
DEBUG:elasticsearch:> {"query":"SELECT "street.keyword" AS "street.keyword"\nFROM "italy-addresses"\nWHERE ((lower(city.keyword) like '%roma%'))\nGROUP BY "street.keyword"\nLIMIT 1000"}
DEBUG:elasticsearch:< {"error":{"root_cause":[{"type":"verification_exception","reason":"Found 1 problem\nline 3:9: Unknown function [lower], did you mean [POWER]?"}],"type":"verification_exception","reason":"Found 1 problem\nline 3:9: Unknown function [lower], did you mean [POWER]?"},"status":400}
I don't know if it's only me getting this or if I'm just missing something.
In the Elasticsearch's official documentation it is possible to find the equivalent for the function lower() as LCASE:
https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-functions-string.html#sql-functions-string-lcase
Steps to reproduce:
It seems noone is getting this error so I think I might be doing something wrong.
Since I don't know who generates the query with the lower() function I explored the code that manipulates SQL in Superset, Elasticsearch db engine and elasticsearch-dbapi, but had no luck.
Any advice is welcome!
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions