You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Patcharee Thongtra <Pa...@uni.no> on 2014/05/28 09:02:04 UTC
HCatalog select one column from hive
Hi,
I am very new to pig and hive. In pig, how can I execute this command
'select a_column from a_table' through HCatalog? Any guidance is
appreciated.
Patcharee
Re: HCatalog select one column from hive
Posted by David LaBarbera <da...@localresponse.com>.
The pig script should be as easy as
hive_table = LOAD ‘a_table’ USING org.apache.hcatalog.pig.HCatLoader();
hive_column = FOREACH hive_table GENERATE a_column;
The trickier part could be the pig infrastructure. You can try just running the script with -useHCatalog. You may need to register the hcat jars, too.
David
On May 28, 2014 at 3:02:33 AM, Patcharee Thongtra (patcharee.thongtra@uni.no) wrote:
Hi,
I am very new to pig and hive. In pig, how can I execute this command
'select a_column from a_table' through HCatalog? Any guidance is
appreciated.
Patcharee