Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经有一个使用 Pig 创建的表。现在我想在每一行(记录)中添加一个随机数,以便为我提供一个包含此添加列的新表。
这可能吗?如何?
您可以为此目的使用RANDOM UDF。 例如:
A = ... B = foreach A generate (int)(RANDOM()*100.0) as rnd, [other fields...]