Support Questions

Find answers, ask questions, and share your expertise

How to make pig scripts should choose both hcatalog and tez???

avatar
Expert Contributor

I would like to know what are the different ways to enable hcatalog and tez in writing pig scripts.

1 ACCEPTED SOLUTION

avatar
Master Guru

@Suresh Bonam

To use both the options, use below command:

pig -useHCatalog -x tez -f script.pig

To use only Hcat:

pig -useHCatalog -f script.pig

To use only tez:

pig -x tez -f script.pig

View solution in original post

4 REPLIES 4

avatar
Master Guru

@Suresh Bonam

To use both the options, use below command:

pig -useHCatalog -x tez -f script.pig

To use only Hcat:

pig -useHCatalog -f script.pig

To use only tez:

pig -x tez -f script.pig

avatar
Expert Contributor

@Kuldeep Kulkarni

Is there any way like ,Using "set" in directly grunt shell???

eg: set exectype=tez;

avatar
Master Guru

@Suresh Bonam

Unfortunately No! Either we need to pass it via command line or set "exectype=tez" in pig.properties via Ambari

avatar
Master Mentor

you can enable hcatalog commands in pig programmatically, use the steps in the following article https://community.hortonworks.com/questions/1954/hcatbin-is-not-defined-define-it-to-be-your-hcat-s....