gpt4 book ai didi

hive - 在 Hive 中创建 View ,列名称中包含空格

转载 作者:行者123 更新时间:2023-12-02 11:01:32 25 4
gpt4 key购买 nike

在 Hive 0.7 中,有没有办法创建列名中有空格的 View ?在 SQL Server 中我会这样做:

CREATE VIEW test_vw
AS
SELECT col_name as [col name with spaces]
FROM test_tbl;

有类似的 hive 吗?

我们需要带有名称的 View 供最终用户工具使用。

最佳答案

来自Hive documentation :

In Hive 0.12 and earlier, only alphanumeric and underscore characters are allowed in table and column names.

In Hive 0.13 and later, column names can contain any Unicode character (see HIVE-6013). Any column name that is specified within backticks (`) is treated literally

关于hive - 在 Hive 中创建 View ,列名称中包含空格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24569643/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com