【问题标题】:handling keywrod while using get_json_object in HIVE在 HIVE 中使用 get_json_object 时处理关键字
【发布时间】:2017-12-02 07:04:47
【问题描述】:

我有一个 JSON,我试图在 HIVE 中使用 get_json_object 内置函数对其进行解析。在我的 JSON 中有一个像“timestamp”这样的键,我的解析失败了,因为“timestamp”被标识为关键字。

我正在尝试使用select get_json_object(col1,'$.timestamp') as ts from table1

在 HIVE 中使用 get_json_object 时如何处理关键字?

【问题讨论】:

    标签: hive getjson


    【解决方案1】:

    运行此命令以忽略关键字。

    SET hive.support.sql11.reserved.keywords=false;

    【讨论】:

      猜你喜欢
      • 2017-08-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-07-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多