apache pig - combine multiple columns in pig? -


i entirely new pig. want combine multiple columns 2 relation , b using iid field. seems simple, cannot figure out how correctly, i've tried join since there no column in common givs nothing.

so here data:

a fullname age cin  b     evaluation productivty 

and want output this:

fullname age cin evaluation productivty 

.. .. .. .. ..

thanks

load 2 relations , create new relation columns.assuming both files have same number of rows , fields tab delimited.you can use right datatype based on data.

a = load 'data1.txt' using pigstorage('\t') (fullname:chararray,age:int,cin:int); b = load 'data2.txt' using pigstorage('\t') (evaluation:chararray,productivity:chararray); c = foreach generate a.fullname,a.age,a.cin,b.evaluation,b.productivity; dump c; 

Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -