Connecting to AWS Elasticsearch 7.1?

Issue Summary

Connecting to AWS Elasticsearch reporting success on connection test, but fails to load indices or execute queries. Errors arise when refreshing (“Cannot refresh indices”) and when executing any query ("Type ‘bool’ is not iterable) - so it looks like possibly AWS Elasticsearch Service 7.1 is not supported?

Technical details:

  • Redash Version: 8.0.0
  • Browser/OS: chrome, macos
  • How did you install Redash: self hosted, premade ec2 ami
1 Like

Same case here, Elasticsearch also hosted.

Error same.

Tried to capture/decode communication with wireshark, Elasticsearch looks like correct output, no any error while linting, but looks a bit weird, like it contains lot’s of staff but no records.

Here is some more detailed error from redash:

[2020-03-04 11:22:31,194][PID:388][WARNING][ForkPoolWorker-333] task_name=redash.tasks.refresh_schema task_id=df03835a-1353-4d13-a1d9-397722499742 Failed refreshing schema for the data source: XXX
Traceback (most recent call last):
  File "/app/redash/tasks/queries.py", line 261, in refresh_schema
    ds.get_schema(refresh=True)
  File "/app/redash/models/__init__.py", line 155, in get_schema
    schema = sorted(query_runner.get_schema(get_stats=refresh), key=lambda t: t['name'])
  File "/app/redash/query_runner/elasticsearch.py", line 173, in get_schema
    columns.extend(parse_doc(items))
  File "/app/redash/query_runner/elasticsearch.py", line 154, in parse_doc
    for field, description in doc['properties'].items():
TypeError: string indices must be integers

Which ES connector? There are two.

As I have self hosted elastic tried both Kibana and Elasticsearch (not amazon one)

both end up with same result.

trying to run simple queries from this page:

https://redash.io/help/data-sources/querying/elasticsearch

just replacing names of index and fields.

Also found that if I specify wrong index name, correct error message appears that no such index.