我一直在使用superset通过配置单元查询外部表。此表包含的列主要是hive复杂数据类型,如struct
。
我如何在SQL LAB中编写一个类似下面的查询?
SELECT header.guid
FROM table1
WHERE guid = 'xxxx'
其中header
是struct数据类型,guid
是标题的成员。
我可以看到的问题是pyhive maps字符串的struct数据类型,虽然不知道如何绕过它
答案 0 :(得分:0)
我通过prestodb查询配置单元来完成这项工作。 PrestoDB需要额外的镶木地板配置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