如何“更新”一个使用拉丁文的专栏 [英] How to "update" a column using pig latin

查看:116
本文介绍了如何“更新”一个使用拉丁文的专栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我有以下表格供我使用:

  A:{x:int,y:int,z: int,... 99其他列...} 

我现在想要转换它,例如 z 设置为 NULL 其中 x> y ,并将结果数据集存储为 B



不必明确提及所有其他列,因为这成为维护的噩梦。



有没有简单的解决方案?


<在这个JIRA中跟踪这个问题:
PIG-1693 在foreach中需要一种方法来表示和所有其他字段。

目前,我不知道任何事情比做你说或不加载Z更简单,并添加一个新的列Z与明星表情


Imagine I have the following table available to me:

A: { x: int, y: int, z: int, ...99 other columns... }

I now want to transform this, such that z is set to NULL where x > y, with the resulting dataset to be stored as B.

and I want to do it without having to explicitly mention all the other columns, as this becomes a maintenance nightmare.

Is there a simple solution?

解决方案

This issue is tracked in this JIRA: PIG-1693 There needs to be a way in foreach to indicate "and all the rest of the fields"

Currently I don't know anything simpler than doing what you say or not loading Z and adding a new column Z with the star expression.

这篇关于如何“更新”一个使用拉丁文的专栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆