Pig CLI陷入">>"符号提示输入

时间:2016-03-29 19:49:47

标签: hadoop apache-pig

我想了解下面的Pig代码有什么问题。下面代码的最后一次导致Pig CLI陷入">>"提示输入,但无论我输入什么,它都会继续提示。

 newServiceIdMapping  = load '/idn/home/data/new/ServiceIdMapping_test.csv' USING PigStorage(',') AS (market : chararray , serviceId : chararray , rm : chararray , serviceChannel : chararray , team : chararray , pm : chararray , tl : chararray , gh : chararray );

 newServiceIdMappingUpd = FOREACH newServiceIdMapping GENERATE (serviceId,rm , (pm == '' ? tl : pm) As pm1  ); 

1 个答案:

答案 0 :(得分:2)

GENERATE后排除括号。

newServiceIdMapping  = load '/idn/home/data/new/ServiceIdMapping_test.csv' USING PigStorage(',') AS (market : chararray , serviceId : chararray , rm : chararray , serviceChannel : chararray , team : chararray , pm : chararray , tl : chararray , gh : chararray );

newServiceIdMappingUpd = FOREACH newServiceIdMapping GENERATE serviceId,rm , (pm == '' ? tl : pm) as pm1 ;