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

Nested fields support #22

Open
vprus opened this issue Jun 16, 2022 · 2 comments
Open

Nested fields support #22

vprus opened this issue Jun 16, 2022 · 2 comments

Comments

@vprus
Copy link

vprus commented Jun 16, 2022

I am using driver version 1.0.3 together with Trino 385, metabase 0.43 and delta. In delta we have a table with fairly nested schema. E.g. there's a column "device" with "os_type" field inside. In metabase, these columns end up with non-nested types.

The highlighted columns on the screenshots are both complex structures, not boolean or ints.

image

Is this something to be addressed on the driver side? From the metabase issues, such as metabase/metabase#3173, it appears that it does not have perfect support for nested schemas, but at least some support for mongo - so the first step is the driver support.

@andrewdibiasio6
Copy link
Member

So, the approach would be similar to that of mongo's, where you would ecxpect to see something like:
device.os_type?

@vprus
Copy link
Author

vprus commented Jun 17, 2022

I am not yet entirely sure how it works in Mongo. IIUC, it works by:

  • Mongo driver reporting field type as JSON
  • Metabase sampling the field values and inferring schema
  • Query building allowing to filter/group on the nested fields (at least Query builder bug fixes metabase/metabase#3738 claims that it works)

In case of Trino+Delta, it probably would be better to skip sampling of fields, since Delta knows the exact types, but getting feature parity with Mongo would be already awesome.

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

No branches or pull requests

2 participants