在Superset的SQL LAB

时间:2017-08-01 22:54:11

标签: hive sqlalchemy superset pyhive

我一直在使用superset通过配置单元查询外部表。此表包含的列主要是hive复杂数据类型,如struct。 我如何在SQL LAB中编写一个类似下面的查询? SELECT header.guid FROM table1 WHERE guid = 'xxxx' 其中header是struct数据类型,guid是标题的成员。

我可以看到的问题是pyhive maps字符串的struct数据类型,虽然不知道如何绕过它

1 个答案:

答案 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