presto/trino可以阅读蜂巢视图

发布于 2025-02-14 00:15:34 字数 1030 浏览 0 评论 0 原文

我一直在尝试使用胶水数据目录和EMR上的Presto/Trino查询一些非常简单的Hive视图,但没有运气。 该错误要么是“找不到”或“不支持的蜂巢视图”。我试图将Trino配置为遗产和实验性()但是,当我覆盖Trino中的默认行为(即忽略视图)时,Trino服务器服务只会没有开始。

我尝试阅读的观点真的很简单,也应该以旧版或实验模式来支持它们,而且定义的语言是ANSI SQL。

数据目录和PRESTO之间是否存在已知的不相容性?还是与EMR?我知道问题不是版本,因为我使用了多个来测试此行为,并且始终是同一问题。

更新 - >我从Hive收到的Create View语句是我所有视图的类似内容,仅使用ANSI SQL:

CREATE VIEW `schema`.`view` AS
select
    `table`.`col1`,
    `table`.`col2`,
    `table`.`col3`
from
    `schema`.`table`
where
    table.datetime = '20220623'

UPDATE - >一旦我在 Trino-Connector-Hive 中应用此配置后,我就可以使用Trino读取视图。但是我仍然无法使用Presto查看视图

[
    {
        "classification": "presto-connector-hive",
        "properties": {
            "hive.metastore.glue.datacatalog.enabled": "true",
            "hive.views-execution.enabled": "true"
        }
    }
]

I have been trying to query some really simple Hive views using Glue Data Catalog and Presto/Trino on EMR with no luck.
The error is either 'View not found' or 'Hive views not supported'. I have tried to configure Trino with the legacy and experimental (as explained in this doc) but when I override the default behavior in Trino (which is to ignore the views), the trino-server service just does not start.

The views I try to read are really simple, they should be supported by either legacy or experimental mode, also, the language in which they are defined is ANSI SQL.

Is there a known incompatibility between the Data Catalog and Presto? Or maybe with EMR? I know the problem is not versions as I have used multiple to test this behavior and it's always the same issue.

Update -> The create view statement I receive from Hive is something like this for all my views, only ANSI SQL is used:

CREATE VIEW `schema`.`view` AS
select
    `table`.`col1`,
    `table`.`col2`,
    `table`.`col3`
from
    `schema`.`table`
where
    table.datetime = '20220623'

Update -> I was able to read view using Trino once I applied this configuration in EMR Software Settings under trino-connector-hive "hive.views-execution.enabled": "true" but I still can't query views using Presto

[
    {
        "classification": "presto-connector-hive",
        "properties": {
            "hive.metastore.glue.datacatalog.enabled": "true",
            "hive.views-execution.enabled": "true"
        }
    }
]

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

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

发布评论

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