Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend support to Elasticsearch nested field queries #3456

Closed

Conversation

fernandoprocy
Copy link

@fernandoprocy fernandoprocy commented Feb 17, 2019

Hey, everyone,

In my first PR I mentioned this other issue with Elasticsearch support. Luckily I got some free time and could work on that this weekend.

Currently, Redash doesn't parse nested field queries results properly.

As illustration, there is the logs sample dataset from Elasticsearch, in which there are a few nested structs, like machine and geo.

logs
├── machine
│   ├── os
│   └── ram
├── geo
│   └── coordinates
│       ├── lat
│       ├── lon
│       └── ...

Currently, Redash doesn't parse the json result and send it as is, even if you query for a single nested field.

This PR adds support to that, parsing the dict using a dict flatten generic function. If the user queries the parent structure, it will return every nested field. If they only query the nested field, only the nested field will get returned.

screen shot 2019-02-17 at 20 01 55

screen shot 2019-02-17 at 20 00 24

Any criticism will be welcome. Thanks!

@ghost ghost added the in progress label Feb 17, 2019
@arikfr
Copy link
Member

arikfr commented Oct 27, 2019

Thank you for your effort on this and apologies that it wasn't merged eventually. Due to the state of the current implementation and the inability to properly test new changes, we decided to commit to making a new Elasticsearch query runner (#4293) and will address this and the other issues there.

@arikfr arikfr closed this Oct 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants