starburstdata / metabase-driver

Starburst Metabase driver
Apache License 2.0
65 stars 10 forks source link

Nested fields support #22

Open vprus opened 2 years ago

vprus commented 2 years ago

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 https://github.com/metabase/metabase/issues/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 commented 2 years ago

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

vprus commented 2 years ago

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

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.