【发布时间】:2022-01-24 08:45:52
【问题描述】:
我使用Spark Structured Streaming (3.1.1) 从Kafka 读取数据,并使用HUDI (0.8.0) 作为S3 上的存储系统,按日期对数据进行分区。 (这部分没有问题)
我希望使用Trino (355) 能够查询该数据。作为前驱者,我已经将hudi-presto-bundle-0.8.0.jar 放在/data/trino/hive/ 中
我创建了一个具有以下架构的表
CREATE TABLE table_new (
columns, dt
) WITH (
partitioned_by = ARRAY['dt'],
external_location = 's3a://bucket/location/',
format = 'parquet'
);
即使调用下面的函数,trino 也无法发现任何分区
CALL system.sync_partition_metadata('schema', 'table_new', 'ALL')
我的评估是,我无法使用 hudi 在 trino 下创建表格,这主要是因为我无法在 WITH 选项下传递正确的值。
我也无法在 HUDI 文档下找到创建表示例。
如果有人可以给我一个例子,或者指出正确的方向,如果我错过了什么,我将非常感激。
非常感谢您的帮助
小更新: 尝试添加
connector = 'hudi'
但这会引发错误:
Catalog 'hive' does not support table property 'connector'
【问题讨论】:
-
运行 sync_partition_metadata 时是否有任何输出?您应该验证您指向的是会话中的目录还是我们的 url 字符串。
-
@BrianOlsen 当我调用sync_partition_metadata 时根本没有输出。此外,当登录 trino-cli 时,我确实传递了参数
--catalog hive
标签: apache-spark create-table trino apache-hudi