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

Switch to Plain View
Pig >> mail # user >> Loading text file


+
JAGANADH G 2012-10-03, 16:49
Copy link to this message
-
Re: Loading text file
There is not a pre-built load function to do that.  In fact I am not aware of a Hadoop InputFormat that does that.  So you would first need to subclass Hadoop's FileInputFormat and then write a Load Func.  Both should be fairly straight forward since all you need to do is remove the record and field parsing from existing code.

Alan.

On Oct 3, 2012, at 9:49 AM, JAGANADH G wrote:

> Hi All
>
> Is there any way to load a text file as single record (text:chararray) in
> Pig.
>
> I am trying to load a bunch of text files from a directory . But it keeps
> each line as single record.
>
>
> --
> **********************************
> JAGANADH G
> http://jaganadhg.in
> *ILUGCBE*
> http://ilugcbe.org.in
+
Siddharth Tiwari 2012-10-04, 06:43
+
Jonathan Coveney 2012-10-04, 21:24