Trino不会自动扫描源中的新负载数据

发布于 2025-01-20 14:19:18 字数 779 浏览 2 评论 0原文

我使用 Trino 使用以下两个查询来读取分区 parquet 文件,但我观察到的一件事是 Trino 不会自动扫描分区目录,这意味着当分区文件夹中有新加载的 parquet 文件时,数据不会自动显示在我创建的 Trino 表中,我检查了 hive.cache.enabled 和 hive.file-status-cache-tables 的 Hive 连接器设置,它们都是默认值,有没有人遇到过这种情况,或者知道为什么会发生这种情况?

CREATE TABLE IF NOT EXISTS minio.xxx.currency (
currency_code VARCHAR,
currency_name VARCHAR,
firmid VARCHAR,
source VARCHAR,
year VARCHAR,
month VARCHAR,
day VARCHAR,
time VARCHAR,
correlationid VARCHAR
)
with (
external_location = 's3a://xxx/currency/',
partitioned_by = ARRAY['firmid','source','year','month','day','time','correlationid'],
format = 'PARQUET');
CALL minio.system.sync_partition_metadata
(
schema_name=>'xxx',
table_name=>'currency',
mode=>'FULL',
case_sensitive=>false
);

I am using Trino to read partition parquet file using following two queries, but one thing I observed is Trino will not automatically scan the partition directories, which means when there are new loaded parquet files in the partition folder, the data will not automatically show up at Trino table that I create, I checked the Hive connector setting for hive.cache.enabled and hive.file-status-cache-tables, they are all default values, has anyone met this situation before, or any idea why this happens?

CREATE TABLE IF NOT EXISTS minio.xxx.currency (
currency_code VARCHAR,
currency_name VARCHAR,
firmid VARCHAR,
source VARCHAR,
year VARCHAR,
month VARCHAR,
day VARCHAR,
time VARCHAR,
correlationid VARCHAR
)
with (
external_location = 's3a://xxx/currency/',
partitioned_by = ARRAY['firmid','source','year','month','day','time','correlationid'],
format = 'PARQUET');
CALL minio.system.sync_partition_metadata
(
schema_name=>'xxx',
table_name=>'currency',
mode=>'FULL',
case_sensitive=>false
);

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文