Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here. Want to know more about what has changed? Check out the Community News blog.

How to execute pig script from java

Highlighted

How to execute pig script from java

New Contributor

How to execute pig script from java class.

I have installed pig on linux system and my java application on windows system.

Thanks

3 REPLIES 3

Re: How to execute pig script from java

@Atul Raut,

You can use Embedded pig to do this. Check this example

https://acadgild.com/blog/embedding-pig-java

.

-Aditya

Re: How to execute pig script from java

New Contributor

Thank you Aditya,

How to tail PigServer object, where is pig installed?

Thank you

Re: How to execute pig script from java

New Contributor

Hello Aditya,

I read the link which you provide to me. So my understanding is Pig should be installed on the machine on which I am going to execute the java program (Correct me if I am wrong). But I need to submit Pig script from my java application to the Pig server (This may be on any remote location) and that Pig server will execute that script and return the result to my java application. Thank you in advanced for your support.