Thanks, the docs need an updating. I referred to them late at night and forgot about UDFContext:
Schemas One request from users is to have the ability to examine the input schema of the data before processing the data. For example, they would like to know how to convert an input tuple to a map such that the keys in the map are the names of the input columns. The current answer is that there is now way to do this. This is something we would like to support in the future. http://wiki.apache.org/pig/UDFManual On Fri, Apr 20, 2012 at 2:53 PM, Daniel Dai (JIRA) <[email protected]> wrote: > > [ > https://issues.apache.org/jira/browse/PIG-2641?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13258611#comment-13258611] > > Daniel Dai commented on PIG-2641: > --------------------------------- > > Check EvalFunc.getInputSchema() > > > Create toJSON function for all complex types: tuples, bags and maps > > ------------------------------------------------------------------- > > > > Key: PIG-2641 > > URL: https://issues.apache.org/jira/browse/PIG-2641 > > Project: Pig > > Issue Type: New Feature > > Components: piggybank > > Affects Versions: 0.11, 0.10.1 > > Environment: Foggy. Damn foggy. > > Reporter: Russell Jurney > > Labels: chararray, fun, happy, input, json, output, pants, > pig, piggybank, string, wonderdog > > Fix For: 0.10.0, 0.11 > > > > Original Estimate: 96h > > Remaining Estimate: 96h > > > > It is a travesty that there are no UDFs in Piggybanks that, given an > arbitrary Pig datatype, return a JSON string of same. I intend to fix this > problem. > > -- > This message is automatically generated by JIRA. > If you think it was sent incorrectly, please contact your JIRA > administrators: > https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa > For more information on JIRA, see: http://www.atlassian.com/software/jira > > > -- Russell Jurney twitter.com/rjurney [email protected] datasyndrome.com
