Does org.apache.pig.builtin.mock.Storage work for you? Thanks, Daniel
On Mon, Aug 4, 2014 at 4:53 AM, Alfonso Nishikawa <[email protected]> wrote: > Greetings. > > For testing purposes I need to create a relation in a Pig script. > I found 2 questions about this in StackOverflow: > > http://stackoverflow.com/questions/13414172/how-to-create-a-small-constant-relationtable-in-pig > http://stackoverflow.com/questions/12423399/define-tuple-datas-in-the-pig-script > > Is there anything about this? > > Resuming, there are 4 possible solutions: > > - Load from a file with the data > - Load an empty file and set data with foreach-generate > - Load from a special loader (ConstantLoader?) > - Add to Pig Latin the construction "A = value". > > I find the solution 1 right, but much hassle to load only 1 tuple. > I find the solution 2 quite dirty. > I find the solution 3 factible. > I find the solution 4 factible but more work than solution 3. > > Another point is that solution 3 is better than solution 1 when it is only > for 1 or 2 tuples because that tuple can be created based on parameteres to > the script. > > I did not find an issue related in jira. Does anyone know about? > > I can develop solution 3, but before creating any issue I think the best > thing is to ask here :) > > Thanks, > > Alfonso Nishikawa -- CONFIDENTIALITY NOTICE NOTICE: This message is intended for the use of the individual or entity to which it is addressed and may contain information that is confidential, privileged and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any printing, copying, dissemination, distribution, disclosure or forwarding of this communication is strictly prohibited. If you have received this communication in error, please contact the sender immediately and delete it from your system. Thank You.
