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