Skip to content
This repository has been archived by the owner on Mar 31, 2021. It is now read-only.

Failed to read index from Dbeaver #57

Closed
sandeep-veerlapati opened this issue Mar 10, 2020 · 4 comments
Closed

Failed to read index from Dbeaver #57

sandeep-veerlapati opened this issue Mar 10, 2020 · 4 comments
Labels
bug Something isn't working

Comments

@sandeep-veerlapati
Copy link

I am using a Dbeaver to access Elasticsearch service on AWS. I am facing an error while trying to access an index having around 100 fields. Though I am able to query the index from the editor, I can't see the schema in the data explorer.
Please find below image for more details about the error.
image

@penghuo
Copy link
Contributor

penghuo commented Mar 10, 2020

Thanks for reporting the issue.
Is it possible to share the index mapping to help debug the issue.
My current guess is the type is missing from the ElasticsearchType.

@Jayu8
Copy link

Jayu8 commented Mar 10, 2020

Attached the index mapping

@penghuo
Copy link
Contributor

penghuo commented Mar 10, 2020

The issues in because the SQL plugin return the field without type info when the field in Elasticsearch mapping is object type. User are not required to set the field type to object explicitly, as this is the default value.

  • The mapping in Elasticsearch index which use implicit Object type.
        "stats" : {
          ”type":"object",
          "properties" : {
            "100%" : {
              "type" : "float"
            },
            "25%" : {
              "type" : "float"
            },
            "50%" : {
              "type" : "float"
            },
            "75%" : {
              "type" : "float"
            },
            "count" : {
              "type" : "float"
            },
            "max" : {
              "type" : "float"
            },
            "mean" : {
              "type" : "float"
            },
            "min" : {
              "type" : "float"
            },
            "std" : {
              "type" : "float"
            }
          }
        },

Result of query DESCRIBE TABLES LIKE kbs-datalake COLUMNS LIKE %

    [
      "elasticsearch",
      null,
      "kbs-datalake",
      "stats",
      null,
      null,
      null,
      null,
      null,
      10,
      2,
      null,
      null,
      null,
      null,
      null,
      10,
      "",
      null,
      null,
      null,
      null,
      "NO",
      ""
    ],

@penghuo
Copy link
Contributor

penghuo commented Mar 10, 2020

One workaround is add the "type":"object" for the field explicitly

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants