【programming pig】preliminary matters

来源:互联网 发布:pcb板设计软件 编辑:程序博客网 时间:2024/05/20 21:23

1. pig中relation名字和field名字不能重新赋值,因为会造成引用丢失

you can write as follows,

A = load 'NYSE_dividends' (exchange, symbol, date, dividends);

A = filter A by dividends > 0;

A = foreach A generate UPPER(symbol);

However, it is not recommended. It looks here as if you are reassigning A, but really
you are creating new relations called A, losing track of the old relations called A.

原创粉丝点击