5

AWS documentation here indicates SQL querying is supported: https://aws.amazon.com/about-aws/whats-new/2019/05/amazon-elasticsearch-service-sql-support/

This page shows the syntax: https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/sql-support.html

POST elasticsearch_domain/_opendistro/_sql
{
  "query": "SELECT * FROM my-index LIMIT 50"
}

Running the following command in the Kibana Dev Tools

POST my_domain/_opendistro/_sql
{
  "query": "SELECT * FROM my-index LIMIT 50"
}

Gives the error

{
  "error": {
    "root_cause": [
      {
        "type": "invalid_type_name_exception",
        "reason": "Document mapping type name can't start with '_', found: [_opendistro]"
      }
    ],
    "type": "invalid_type_name_exception",
    "reason": "Document mapping type name can't start with '_', found: [_opendistro]"
  },
  "status": 400
}

My ElasticSearch version is 6.7.

0

1 Answer 1

1

Since your elasticsearch is driven by AWS and you are using Kibana Dev tools, you could get your query results by following way

POST _opendistro/_sql
{
  "query": "SELECT * FROM your_index "
}

You dont need to enter domain name. It worked for me.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.