【问题标题】:xpath udf (Hive) returns all the array elements , I would like to view each array element in sepearate row rather than one single rowxpath udf (Hive) 返回所有数组元素,我想在单独的行而不是单行中查看每个数组元素
【发布时间】:2020-03-16 14:28:09
【问题描述】:

此方法将单行中的所有 @type 实例作为数组返回给我,而不是我想在单独的行中查看它们。

'''xpath (columnName, '/a/b/c/d/e/@type') as Alias_name'''

请查看附件图片了解当前结果和我期待的结果。Rows

任何建议都会有所帮助。

谢谢。

【问题讨论】:

    标签: hadoop xpath hive xml-parsing


    【解决方案1】:

    您可以使用LATERAL VIEW explode(array-col-name) 并关注此link 以获取有关如何与示例一起使用的更多详细信息

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-07-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-04
      • 2014-02-23
      相关资源
      最近更新 更多