且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

用管道符号替换 PIG 脚本

更新时间:2023-12-05 13:08:22

|{} 是正则表达式中的特殊字符和REPLACE 的第二个参数是一个正则表达式.尝试转义字符:

| and { and } are special characters in regular expressions and the second parameter for REPLACE is a regular expression. Try to escape the characters:

b = FOREACH x generate REPLACE(line1, '35\\|','');