Im new to pig script to pardon me if my question is lame. I know that we can define a datatype for each atom in pig while loading it from a file. But is there a way we can define the datatype after taking a subset of it?
Example:
data = load 'mydata.csv' using PigStrogae(',') AS (col1:int, col2:int);
subsetdata = foreach data generate col1; --> Here i need to define the col1 as int . Is there a way to feed it?