我不熟悉Pig的脚本。我需要帮助加入“b”和“e”。下面是我的剧本。
A = LOAD ....
PAPS_1 = FILTER A BY (dataMap#'corr_id_' is NOT null);
B = FOREACH PAPS_1 GENERATE dataMap#'corr_id_' as id, dataMap#'response' as resp, status;
C = LOAD ..
D = FILTER C BY (dataMap#'corr_id_' is NOT null);
E = FOREACH D GENERATE dataMap#'corr_id_' as id, status;
我试着这样加入。但它不起作用。我得到空值。请纠正我。
F = JOIN B BY id, E BY id;
b中的值:
23456ac、200、0
3453da3,200,0
c值:
23456ac,0
3453da3,0
e中的值:
23456ac,0
3453da3,0
我的输出是:
空,200,0,空,0
空,200,0,空,0
期望值为:
23456ac,200,0,23456ac,0
3453da3,200,0,3453da3,0
提前谢谢
暂无答案!
目前还没有任何答案,快来回答吧!