1
A
回答
0
如果我理解正确的(我昨天开始拉丁文猪)的if-else或for语句,你必须使用Python或Java这样做的猪没有,在这里看到:http://chimera.labs.oreilly.com/books/1234000001811/ch09.html
0
您可以使用条件运算符。例如
(Name=='Joey'? 'Yes':'No')
1
其称为 “Bincond” 操作
之类的语句:
(Price > 75 ? 'High':'Low')
也有效
处理空记录:
((Name is null or IsEmpty(Name)) ? {('unknown')} : Name)
使用它们连同其他领域的别名foreach语句,即:
A = load 'x/y/Price.csv' as (Name, Product, Price);
B = foreach A generate Name, Product, Price, (Price > 75 ? 'High':'Low') as Indicator;
dump B;
相关问题
- 1. Bash脚本 - if和else if语句
- 2. 操作脚本3.0 if else语句
- 3. Linux脚本和If elif else语句
- 4. bash脚本循环与if-else语句
- 5. if else if else语句(JS)
- 6. if/else语句
- 7. If else语句
- 8. if else语句
- 9. if-else语句
- 10. If/else语句
- 11. 的if else语句
- 12. 谷歌电子表格脚本:ELSE语句覆盖IF语句
- 13. 高级 - if/else语句的if/else语句来
- 14. jquery if else语句
- 15. Big if else语句
- 16. IF ELSE语句SQLite
- 17. Python if else语句
- 18. jQuery if/else语句
- 19. PHP if/else语句
- 20. “形” - if-else语句
- 21. PHP IF ELSE语句
- 22. PHP - if ... else ...语句
- 23. VHDL If/Else语句
- 24. jquery if else语句
- 25. string.format if else语句
- 26. hash.indexOf()if else语句
- 27. Oracle IF/ELSE语句
- 28. JQuery Else if语句?
- 29. Laravel if else语句
- 30. XSL if else语句
重复http://stackoverflow.com/questions/17669522/is-there-any-conditional-if-like-operator-in-apache- pig –
http://stackoverflow.com/questions/18913764/pig-split-lack-of-default-or-if-else的副本 – rahulbmv