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

Column name in table header doesn't use field alias #45

Closed
dai-chen opened this issue Apr 2, 2020 · 1 comment · Fixed by #75
Closed

Column name in table header doesn't use field alias #45

dai-chen opened this issue Apr 2, 2020 · 1 comment · Fixed by #75
Labels
bug Something isn't working

Comments

@dai-chen
Copy link

dai-chen commented Apr 2, 2020

For query with field alias in SELECT, for example select account_number AS num from accounts, the result table header is still showing account_number rather than num.

@dai-chen dai-chen added the bug Something isn't working label Apr 2, 2020
@dai-chen
Copy link
Author

dai-chen commented Apr 2, 2020

Since we use default format in SQL Kibana now, I guess this is due to our UI not use "alias" field value in the response:

POST _opendistro/_sql
{  
  "query": "select account_number AS num from accounts limit 1"
}

{
  "schema": [{
    "name": "account_number",
    "alias": "num",
    "type": "long"
  }],
  "total": 1000,
  "datarows": [[1]],
  "size": 1,
  "status": 200
}

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

Successfully merging a pull request may close this issue.

1 participant