Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Pig >> mail # user >> Hard-coded inline relations

Michael Malak 2013-01-18, 18:49
Copy link to this message
Re: Hard-coded inline relations
I agree this would be useful for debugging, but I'd go about it a different way.  Rather than add new syntax as you propose, it seems we could easily create an inline loader, so your script would look something like:

A = load '{(Hello), (World)}' using InlineLoader();
dump A;


On Jan 18, 2013, at 10:49 AM, Michael Malak wrote:

> I'm new to Pig, and it looks like there is no provision to declare relations inline in a Pig script (without LOADing from an external file)?
> Based on
> http://pig.apache.org/docs/r0.7.0/piglatin_ref2.html#Constants
> I would have thought the following would constitute "Hello World" for Pig:
> A = {('Hello'),('World')};
> But I get a syntax error.  The ability to inline relations would be useful for debugging.  Is this limitation by design, or is it just not implemented yet?
Dmitriy Ryaboy 2013-01-24, 21:03
Dmitriy Ryaboy 2013-01-24, 22:20