run and exec utility command difference in pig


3 Answer(s)


Hi Nitesh,

You are right, the major difference between the run and exec in pig is:
run - 1. every store triggers execution.
        2.The statements from the script are put into the command history and all the aliases defined in the script can be referenced in subsequent statements after the run command has completed

exec - 1. No store trigger execute.
         2. The statements from the script are available in command history. No reference is available after command.

When you have some task to execute on pig regulary, exec is preferrable. While when you have to execute certain commands before executing some final commands, you preferred run.

Hope this helps.

Thanks.


Thanks Abhijit this helped me to understand.


good