Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我一直在使用超集通过 hive 查询外部表。该表的列主要是 hive 复杂数据类型,例如struct. 我将如何在 SQL LAB 中编写一个执行如下操作的查询? SELECT header.guid FROM table1 WHERE guid = 'xxxx' whereheader是结构数据类型并且guid是标头的成员。
struct
SELECT header.guid FROM table1 WHERE guid = 'xxxx'
header
guid
据我所知,问题是pyhive 将结构数据类型映射到字符串,尽管还不确定如何解决它
我通过 prestodb 查询配置单元来完成这项工作。PrestoDB 在其etc/catalog/hive.properties目录中需要额外的 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