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

Switch to Plain View
Pig, mail # user - convert rows to columns in Pig


+
soniya B 2013-10-18, 06:34
+
ajay kumar 2013-10-18, 06:44
+
soniya B 2013-10-18, 07:45
+
soniya B 2013-10-19, 03:37
+
Alan Gates 2013-10-21, 16:42
Copy link to this message
-
Re: convert rows to columns in Pig
yonghu 2013-10-19, 06:48
I don't think you can solve this problem by just using pig default
operators. You need to write you own program.
On Sat, Oct 19, 2013 at 5:37 AM, soniya B <[EMAIL PROTECTED]> wrote:

> any one can guide me on this problem?
>
>
> On Fri, Oct 18, 2013 at 1:15 PM, soniya B <[EMAIL PROTECTED]>
> wrote:
>
> > I think it will work for to change columns to rows. I am looking to
> change
> > rows to columns.
> >
> >
> > On Fri, Oct 18, 2013 at 12:14 PM, ajay kumar <[EMAIL PROTECTED]
> >wrote:
> >
> >> try this,
> >>
> >> A = load 'input';
> >> B = foreach A generate FLATTEN(TOBAG(*));
> >>
> >>
> >> On Fri, Oct 18, 2013 at 12:04 PM, soniya B <[EMAIL PROTECTED]>
> >> wrote:
> >>
> >> > Hi,
> >> >
> >> > How to convert rows to columns in pig latin?
> >> >
> >> > example:
> >> >
> >> > input file
> >> >
> >> > A   100     3
> >> > B   200     4
> >> > C   400     6
> >> >
> >> > required output
> >> >
> >> > A        B        C
> >> >
> >> > 100     200    400
> >> >
> >>
> >>
> >>
> >> --
> >> *Thanks & Regards,*
> >> *S. Ajay Kumar
> >> +91-9966159106*
> >>
> >
> >
>