gpt4 book ai didi

hadoop - pig 帮 : How can I add a fixed field that is not defined in the schema

转载 作者:可可西里 更新时间:2023-11-01 16:26:17 27 4
gpt4 key购买 nike

如何添加架构中未定义的固定字段(例如日期或月份)?我运行了以下 pig 脚本以将固定日期添加到我的结果表中,并收到以下错误消息:Invalid field projection。方案中不存在投影字段 [日期]

joined_table = join A by (key1), 
B by (key1);

result = foreach joined_table generate
20140625 as date,
A::value1 as v1,
B::value1 as v2;

最佳答案

这是你可能想要的:

    result = FOREACH joined_table GENERATE '20140625' as date, A::some_field;

关于hadoop - pig 帮 : How can I add a fixed field that is not defined in the schema,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24442097/

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