Home > Database > Mysql Tutorial > body text

Hive命令行

WBOY
Release: 2016-06-07 15:59:13
Original
1284 people have browsed it

Hive 命令行 Hive 命令行示例 从命令行执行指定的sql语句 $HIVE_HOME/bin/hive -e select a.col from tab1 a 以指定的hive环境变量执行指定的sql语句 $HIVE_HOME/bin/hive -e select a.col from tab1 a -hiveconf hive.exec.scratchdir=/home/my/hive_scratc

Hive 命令行\
Hive 命令行示例

从命令行执行指定的sql语句
$HIVE_HOME/bin/hive -e 'select a.col from tab1 a'
以指定的hive环境变量执行指定的sql语句
$HIVE_HOME/bin/hive -e 'select a.col from tab1 a' -hiveconf hive.exec.scratchdir=/home/my/hive_scratch -hiveconf mapred.reduce.tasks=32
以沉默模式执行指定的sql语句,并将执行结果导出到指定文件 HIVE_HOME/bin/hive -e 'select a.col from tab1 a' > a.txt
以非交互式模式执行sql文件
HIVE_HOME/bin/hive -f /home/my/hive-script.sql
在进入交互模式之前,执行初始化sql文件
HIVE_HOME/bin/hive -i /home/my/hive-init.sql
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!