Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in FilterBox SQL Query using elasticsearch-dbapi 0.1.2/0.2.0 on Elasticsearch 7.x.x #13321

Polignao opened this issue Feb 24, 2021 · 0 comments


Copy link

@Polignao Polignao commented Feb 24, 2021

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 for 1.0.1 for 0.990-dev

Elasticsearch is in Docker too, following guide here:

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:

Steps to reproduce:

  • Create a filterbox from an elasticsearch dataset
  • Create a dashboard with the filterbox in it
  • Type something in the filterbox and wait for error to occur

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!


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants