Using the public docker images which seem to be based on Redash 4 (beta?) trying to setup a query for an ES 6 backend results in
Error running query: Failed to execute query. Return Code: 500 Reason: {"error":{"root_cause":[{"type":"illegal_state_exception","reason":"source and source_content_type parameters are required"}],"type":"illegal_state_exception","reason":"source and source_content_type parameters are required"},"status":500}
Looks like redash uses the source query parameter but as per https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html this also requires to provide a source_content_type parameter.
Thanks @chriswue. This sounds like a support issue; have you opened a thread on the forum?
@RichardLitt No, I assumed this was a bug in redash. I will open a support thread
Opened support thread: https://discuss.redash.io/t/connecting-redash-4-to-elasticsearch-6/1412
@RichardLitt Is this really a support issue?
If I go to the relevant line and add the appropriate content type for my query, i.e. change it to;
params = {"source": json.dumps(query_dict), "source_content_type": "application/json"}
then my queries execute as expected.
@chriswue Did you get around this?
@alexdrans Good point. No, I guess it is not. Thanks for the work, there. I'll flag this as a bug.
@alexdrans I haven't found a work-around, needs fixing in Redash. Would have submitted a PR but got side tracked by something else.
Most helpful comment
@RichardLitt Is this really a support issue?
If I go to the relevant line and add the appropriate content type for my query, i.e. change it to;
params = {"source": json.dumps(query_dict), "source_content_type": "application/json"}then my queries execute as expected.
@chriswue Did you get around this?