user2531569 user2531569 - 3 months ago 17
Bash Question

how to invoke shell script in hive

Could someone please explain me how to invoke a shell script from hive?. I explored on this and found that we have to use

source FILE
command to invoke a shell script from hive. But I am not sure how exactly I can call my shell script from hive using
source File
command. So can someone help me on this? Thanks in Advance.

Answer

To invoke a shell script through HIVE CLI, please look at the example below.

!sh file.sh; 

or

!./file.sh;

Please go though Hive Interactive Shell Commands section in the link below for more information. https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Cli

Comments