Finally figured it out. Flatten did the trick. Had to call flatten on the tuple returned by the UDF as shown below.
B = FOREACH A GENERATE FLATTEN(PackageName.MyMethod()); Hope someone out there can make use of this behavior. Thanks -Akash -----Original Message----- From: Sharma, Akash [mailto:[email protected]] Sent: Tuesday, May 03, 2011 2:52 PM To: [email protected] Subject: Question about Pig UDF and sqoop export New to Pig UDF so requesting help to resolve the issue Created a Pig UDF to transform an input tuple and generate an transformed tuple. Executed a Store to save the transformed tuple into a file B = FOREACH A GENERATE PackageName.MyMethod(); STORE B into 'output' USING PigStorage(); My question is that when sqoop export reads this data from output HDFS file and inserts into MYSQL table, the curly braces "(" and ")" are also saved into the first and the last column of mysql table. Is there a way to avoid curly braces for getting into MySQL column as part of first and last column? I tried to delimit to tabs explicitly in PigStorage() but that did not resolve the issue. Any help is appreciated. Thanks -Akash
