在superset的sql lab中查询hive复杂数据类型,如struct

eqfvzcg8  于 2021-06-26  发布在  Hive
关注(0)|答案(1)|浏览(345)

我一直在使用超集通过配置单元查询外部表。此表包含的列主要是配置单元复杂数据类型,如 struct . 我该如何在sql实验室中编写一个查询来执行以下操作? SELECT header.guid FROM table1 WHERE guid = 'x' 哪里 header 是结构数据类型 guid 是标头的成员。
据我所知,问题是pyhive将struct数据类型Map为string,尽管还不确定如何绕过它

ej83mcc0

ej83mcc01#

我通过prestodb查询hive得到了这个结果。prestodb需要额外的Parquet配置 etc/catalog/hive.properties 目录:

connector.name=hive-hadoop2
hive.metastore.uri=thrift://<hive_url>:9083
hive.parquet-optimized-reader.enabled=true
hive.parquet-predicate-pushdown.enabled=true

相关问题