Hi,
I am trying query a data set on HDFS using PIG.
Data = LOAD '/user/xx/20130523/*;
x = FOREACH Data GENERATE cookie_id;
I get below error.
Invalid field projection. Projected field [cookie_id]
does not exist
How do i find the column names in the bag "Data" . The developer who
created the
hi, you got the error because you did not arrange name to the fields, pig
did not know which column is called cookie_id. you'd better do like below:
Data = LOAD '/user/xx/20130523/*';
x = FOREACH Data GENERATE (chararray) $i AS cookie_id;
i is the index of the cookie_id in the tuple counting fro