You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Bhavesh Shah <bh...@gmail.com> on 2012/04/17 13:22:48 UTC
How to call Shell Script from Hive JDBC
Hi all,
I have implemented a task in Hive.
But I need to call a Shell Script in which I have written SQOOP commands
for importing the tables in Hive from SQL Server.
I tried to call a Shell Script in one of the Demo Application but as the
Program runs no action taken place. I just see the blank console and a
message which I have printed.
Is it possible to call the Shell Script for importing and exporting the
tables in HIve?
Do I need to do something extra in case of Hive? Please help me out from
this.
Thanks.
--
Regards,
Bhavesh Shah
Re: How to call Shell Script from Hive JDBC
Posted by Bejoy Ks <be...@yahoo.com>.
Bhavesh
It is definitely possible. If the shell has sqoop and hive queries, better approach would be warp the hive queries in a file include the following line in your script at the appropriate position before of after your SQOOP commands.
hive -f 'path/to/file/hivefile.hql'
To troubleshoot your issue.
- Is the script running from CLI on the same client you are triggering the app?
- Is the commands within the script executing individually on the same client?
Regards
Bejoy KS
________________________________
From: Bhavesh Shah <bh...@gmail.com>
To: user@hive.apache.org; dev@hive.apache.org
Sent: Tuesday, April 17, 2012 4:52 PM
Subject: How to call Shell Script from Hive JDBC
Hi all,
I have implemented a task in Hive.
But I need to call a Shell Script in which I have written SQOOP commands for
importing the tables in Hive from SQL Server.
I tried to call a Shell Script in one of the Demo Application but as
the Program runs no action taken place. I just see the blank console and a message which I have printed.
Is it possible to call the Shell Script for importing and exporting the tables in HIve?
Do I need to do something extra in case of Hive?
Please help me out from this.
Thanks.
--
Regards,
Bhavesh Shah