Hi, Below are list of tuples generated after flattening a bag . (day, age, name, address, ['k1#v1','k2#v2']), (12/2,22,deepak,newyork, ['k1#v1','k2#v2']), (12/3,22,deepak,newjersy, ['k1#v1','k2#v2'])
process = foreach inputs generate com.yahoo.peblpig.udf.InvokeProcess($0); Here $0 some how gets only (day, age, name, address) and the map is skipped. *How can i access the map? * With $1 i get "Out of bound access. Trying to access non-existent column: 1. Schema {bytearray} has 1 column(s)", $0.$1 throws java.lang.ClassCastException: java.lang.String cannot be cast to org.apache.pig.data.Tuple at org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POProject.getNext(POProject.java:389) Also, With tuples = foreach flattenedTuples generate $0 generates (day, age, name, address), (12/2,22,deepak,newyork), (12/3,22,deepak,newjersy) After flatenning if i dump, i see the map in the resultant tuples, but $0 instead referring to entire tuple, referes only to data part (map skipped) Regards, Deepak