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

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

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.


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.
> --
> **********************************
> http://jaganadhg.in
> http://ilugcbe.org.in