如何“更新"使用猪拉丁语的列 [英] How to "update" a column using pig latin

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

问题描述

想象一下,我可以使用下表:

Imagine I have the following table available to me:

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

我现在想转换它,这样 z 被设置为 NULL 其中 x >y,结果数据集存储为 B.

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?

推荐答案

此问题已在此 JIRA 中跟踪:PIG-1693 foreach 中需要有一种方法来指示以及所有其余字段"

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"

目前我不知道有什么比按照您说的做或不加载 Z 并使用 明星表达.

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天全站免登陆