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

SQL: selecting fields of type object or nested #37801

Closed
bpintea opened this issue Jan 24, 2019 · 2 comments
Closed

SQL: selecting fields of type object or nested #37801

bpintea opened this issue Jan 24, 2019 · 2 comments

Comments

@bpintea
Copy link
Contributor

bpintea commented Jan 24, 2019

Currently, selecting a nested or an object field will fail the query.
This is problematic with some BI tools, since these try to offer the user a preview of the data. This is done:

  • right after the connection is made and available tables listed to the user, if they simply clicking on any of the listed tables that contain such a column (/index field), in preparation to load the data from it;
  • before the user gets a chance to see the columns in the table and be given the choice of which ones to load.

This leads to the user generally not being able to use the tool right away. Workarounds exist, but they would require the user to find out the list and types of the columns and construct an SQL query manually to avoid the problematic fields.

Potential solutions:

  • not listing the nested and object columns, if the client is of certain type (ODBC); but still allow SELECT'ing subfields, if explicitly requested.
  • listing these columns, but not failing the request, by maybe returning:
    • NULL for these fields, if directly selected;
    • a binary/base64 blob for object;
    • a JSON for nested, stringified up to a certain default level.
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

@astefan
Copy link
Contributor

astefan commented Jan 31, 2019

master (7.0.0): 908c8de
6.x (6.7.0): 423b3b0
6.6 (6.6.1): 754b70c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants