0
votes

I am trying to run a pig script in UNIX. My script is called companyx_desktop_impressions.pig

The pig executable file lives in usr/bin/pig

So to run it, I am typing:

$ exec usr/bin/pig/companyx_desktop_impressions.pig

...but I am receiving errors repeating what I typed followed by "Not a directory"

What am I doing wrong? Do I need to use PATH to access pig in my home folder first?

EDIT: I am also getting the error "-bash: pig: command not found"

1
Can you share a MCVE to demonstrate your issue?skrrgwasme
Do you configured pig?Rengasamy

1 Answers

1
votes

To execute a pig script you should use "pig" instead of "exec", and also you have to export path to bin directory of pig, which will help system also in understanding what "pig" means.

EXPORT $PATH: OR you can write same export command in your .bashrc file which will export pig path every time whenever system will start.

after that to run your script use below command

pig usr/bin/pig/companyx_desktop_impressions.pig