incubator-hcatalog-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sushanth Sowmyan <khorg...@gmail.com>
Subject Re: storing tables as textfiles
Date Wed, 27 Jul 2011 03:28:57 GMT
Short answer, yes. :)

Long Answer : It's currently possible to read from it, but not write
to it yet. The PigStorageInputDriver in conjunction with HCatLoader
does what you need if you create a table with the appropriate
metadata. You'll currently need to do the following:

a) Create the table (while doing so, currently, you'll still tell it
that you're creating as RCFile because that's the only
outputstoragedriver still implemented)
b) Alter table set inputdriver as PigStorageInputDriver
c) Read from pig to your heart's content.

This unit test does so by code :
https://svn.apache.org/repos/asf/incubator/hcatalog/trunk/src/test/org/apache/hcatalog/pig/TestPigStorageDriver.java

For a more usable example, proper documentation is still a todo on this.

Hope that helps,
-Sushanth

On Tue, Jul 26, 2011 at 4:51 PM, Chris Tierney <hiiichriiisss@gmail.com> wrote:
> Hello Users,
> Is it possible to load a TSV into HCatalog, store it as a textfile and query
> it using Pig?  If not, are there any JIRA's I should be following to know
> when this will be possible?
> Thanks,
> CT

Mime
View raw message