apache pig - Syntatic Error in code-block -


i encountered syntatic error not solve;

grunt> describe x; x: {id: int,b: {(first: int,second: int)}}  grunt> res = foreach x {f = flatten(b); generate id,f;} 2013-07-22 12:28:53,050 [main] error org.apache.pig.tools.grunt.grunt - error 1200: <line 11, column 21>  syntax error, unexpected symbol @ or near 'flatten' 

how can that?

see http://pig.apache.org/docs/r0.11.0/basic.html#foreach

only cross, distinct, filter, foreach, limit, , order allowed in nested block.

try

res = foreach x generate id, flatten(b.(first, second)); 

Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -