hive用法-f-e-S-i
来源:互联网 发布:windows线程优先级 编辑:程序博客网 时间:2024/04/29 23:12
$HIVE_HOME/bin/hive是一个shell工具,它可以用来运行于交互或批处理方式配置单元查询。
语法:
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查询语句 Sql from command line
-f <filename>: 从文件中运行sql语句 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 与 -f 不能同时使用。In the absence of these options, interactive shell is started. 但是,-i 能够与任意参数同时使用。多个 –i 的实例可以用来执行多个初始化脚本scripts。However, -i can be used with any other options. Multiple instances of -i can be used to execute multiple init scripts.
通过命令:hive –h 可以查看应用的帮助文档.To see this usage help, run hive -h
运行一个查询:
$HIVE_HOME/bin/ hive -e 'select count(*) from c02_clickstat_fatdt1'
Example of setting hive configuration variables
$HIVE_HOME/bin/hive -e 'select a.col from tab1 a' -hiveconfhive.exec.scratchdir=/home/my/hive_scratch -hiveconf mapred.reduce.tasks=32
将查询结果导出到一个文件
HIVE_HOME/bin/hive -S -e ' select count(*) from c02_clickstat_fatdt1' > a.txt
运行一个脚本
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用法-f-e-S-i
- Hive 之 -e -f -i
- hive cli 常用操作(-e,-f.-i)
- f 4 c u b e s p i debug diary
- f 4 s p i debug 日记 c u b e
- diary of debug c u b e f 4 S P I
- E - Ice_cream's world I
- Te r m i n a t e T h r e a d函数是异步运行的函数,必须调用Wa i t F o r S i n g l e O b j e c t
- a w e a s d f
- A、D、S、L、C、F、I
- C++ i(o)f(s)stream
- js正则表达式中/g /i /m /e /x /s的用法
- 正则表达式中/g /i /m /e /x /s的用法
- F i r s t T h r e a d可以在S e c o n d T h r e a d将5分配给F i r s t T h r e a d的x之前结束它的 操作
- Wi n E x e c和O p e n F i l e等,只是为了实现与1 6位Wi n d o w s程 序的向后兼容而存在
- 想留出了F-R-I-E-N-D区
- 2017 ICPCECPC 邀请赛 F,D,E, I 题解
- 你是一个ISTP[E:3,I:7,S:11,N:9,T:12,F:8,J:8,P:12]类型的人
- Java Web开发环境配置
- 百试不爽的面试经——咳咳,收到比亚迪面试通知的童鞋注意了
- Android基础之用Eclipse搭建Android开发环境和创建第一个Android项目(Windows平台)
- 计算器面向对象
- 角色 RESOURCE、CONNECT、DBA具有的权限
- hive用法-f-e-S-i
- REDIS与MYSQL实现标签的对比
- Warning: readdir(): supplied argument is not a valid Directory resource in /yjdata/www/www/admin/tem
- ajax调用mvc控制器
- OC_05_01
- 如何使用Guava的缓存管理
- [从头学数学] 第02节 欢迎新同学
- awk命令学习
- 打开/查找xcode6的沙盒地目录