我有两个 CSV 文件:
1- Fertiltiy.csv:
2- 预期寿命.csv:
我想加入他们的猪,结果会是这样的:
我是猪新手,我无法得到正确的答案,但这是我的代码:
fertility = LOAD 'fertility' USING org.apache.hcatalog.pig.HCatLoader();
lifeExpectency = LOAD 'lifeExpectency' USING org.apache.hcatalog.pig.HCatLoader();
A = JOIN fertility by country, lifeExpectency by country;
B = JOIN fertility by year, lifeExpectency by year;
C = UNION A,B;
DUMP C;
这是我的代码的结果: