Nested fields support
vprus opened this issue · comments
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.
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.
So, the approach would be similar to that of mongo's, where you would ecxpect to see something like:
device.os_type
?
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 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.