You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by Apache Wiki <wi...@apache.org> on 2010/07/10 04:43:24 UTC
[Hadoop Wiki] Update of "Hive/LanguageManual/Cli" by JohnSichi
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change notification.
The "Hive/LanguageManual/Cli" page has been changed by JohnSichi.
http://wiki.apache.org/hadoop/Hive/LanguageManual/Cli?action=diff&rev1=15&rev2=16
--------------------------------------------------
Usage:
{{{
- Usage: hive [-hiveconf x=y]* [<-f filename>|<-e query-string>] [-S]
+ Usage: hive [-hiveconf x=y]* [<-i filename>]* [<-f filename>|<-e query-string>] [-S]
+ -i <filename> Initialization Sql from file (executed automatically and silently before any other commands)
-e 'quoted query string' Sql from command line
-f <filename> Sql from file
-S Silent mode in interactive shell where only data is emitted
-hiveconf x=y Use this to set hive/hadoop configuration variables.
- -e and -f cannot be specified together. In the absence of these options, interactive shell is started
+ -e and -f cannot be specified together. In the absence of these options, interactive shell is started. However, -i can be used with any other options.
To see this usage help, run hive -h
@@ -39, +40 @@
{{{
HIVE_HOME/bin/hive -S -e 'select a.col from tab1 a' > a.txt
}}}
-
+ * Example of running a script non-interactively
+ {{{
+ HIVE_HOME/bin/hive -f /home/my/hive-script.sql
+ }}}
+ * Example of running an initialization script before entering interactive mode
+ {{{
+ HIVE_HOME/bin/hive -i /home/my/hive-init.sql
+ }}}
== Hive interactive Shell Command ==