[hadoop@hadoop hive-0.13.1]$ bin/hive -help

usage: hive

 -d,--define <key=value>          Variable subsitution to apply to hive

                                  commands. e.g. -d A=B or --define A=B

    --database <databasename>     Specify the database to use

 -e <quoted-query-string>         SQL from command line

 -f <filename>                    SQL from files

 -H,--help                        Print help information

 -h <hostname>                    connecting to Hive Server on remote host

    --hiveconf <property=value>   Use value for given property

    --hivevar <key=value>         Variable subsitution to apply to hive

                                  commands. e.g. --hivevar A=B

 -i <filename>                    Initialization SQL file

 -p <port>                        connecting to Hive Server on port number

 -S,--silent                      Silent mode in interactive shell

 -v,--verbose                     Verbose mode (echo executed SQL to the

                                 console)

1.使用非交互式执行hive语句

  bin/hive -e <quoted-query-string>

eg:

  bin/hive -e "select * from default.student ;"

2.运行存放hive语句的文件

  bin/hive -f <filename>

eg:

  $ echo "select * from db_hive.student ;"  >  hivef.sql

  $ bin/hive -f /opt/datas/hivef.sql

  $ bin/hive -f /opt/datas/hivef.sql > /opt/datas/hivef-res.txt

3.与用户udf相互使用

  bin/hive -i <filename>

4.在hive cli命令窗口中如何查看hdfs文件系统  

  hive (default)> dfs -ls / ; 

5.在hive cli命令窗口中如何查看本地文件系统

  hive (default)> !ls /opt/datas ;

Hive常用非交互式命令的更多相关文章

  1. 两种Linux下非交互式命令的实现

    一.概述 在Linux环境,有多种实现自己主动化的脚本语言.如Shell.Python.Perl.Tcl等. Shell语言因与Shell外壳结合紧密,是最常见的实现自己主动化的脚本语言. 同一时候, ...

  2. hadoop中hive常用的交互式操作

    hive的帮助命令: [hadoop@master tmp]$ hive -help usage: hive -d,--define <key=value> Variable substi ...

  3. Hive:常用的一些命令

    1.一般可以通过beeline,代理方式登录hive; 2.使用数据库abc_hive_db:use abc_hive_db; 3.查看数据库中有哪些表:show tables :有哪些特定表 sho ...

  4. Hive常用的SQL命令操作

    Hive提供了很多的函数,可以在命令行下show functions罗列所有的函数,你会发现这些函数名与mysql的很相近,绝大多数相同的,可通过describe function functionN ...

  5. 安卓日常开发和逆向中常用的shell命令与非shell命令

    简述shell 命令与 非shell命令区别 shell命令不用先adb shell进入界面执行 非shell命令必须要 adb shell进入界面执行 基础非shell命令 1.安装app adb ...

  6. mysql常用命令、非交互式mysql命令看29条

    CentOS下mysql数据库常用命令总结1.更改root密码 mysqladmin -uroot password 'yourpassword' 2.远程登陆mysql服务器 mysql -uroo ...

  7. Hive 常用命令和语句

    示例数据库为 db_hive 1. 创建表 create-table.sql create table if not exists db_hive.tb_user ( id int, username ...

  8. 1.10-1.11 hive交互式命令讲解

    一.hive 交互式命令参数 #帮助 [root@hadoop-senior hive-0.13.1]# bin/hive -h Missing argument for option: h usag ...

  9. HIve常用CLI命令

    1. 清楚屏幕:Ctrl+L 或者!Clear 最后加上分号 2. 查看数据仓库中的表:show tables; 3. 查看数据仓库中内置函数:show functions: 4. 查看表结构 :de ...

随机推荐

  1. object-fit 用于图片适应

    参考文章: object-fit

  2. Module——模块加载语法

    简介:标准module用法: 模块功能主要由两个命令构成:export和import. export有三种写法: // profile.js // 写法一 export var m = 1; // 写 ...

  3. ES6 字符串的解构赋值

    字符串也可以解构赋值.这是因为此时,字符串被转换成了一个类似数组的对象. const [a, b, c, d, e] = 'hello'; a // "h" b // " ...

  4. leetcode-easy-array-283 move zeros

    mycode  77.24% class Solution(object): def moveZeroes(self, nums): """ :type nums: Li ...

  5. 使用resultMap定义查询结果集,实现关联查询

    接下来介绍resultMap定义查询结果集,实现关联查询 1 首先在接口中定义操作的方法 public interface EmployeeMapperPlus { public Employee g ...

  6. ubuntu16.04 卸载及安装MySQL

    以MySQL- 5.7.18为例: sudo apt-get autoremove --purge mysql-server-5.7 #sudo apt-get remove mysql-server ...

  7. 中国MOOC_零基础学Java语言_第4周 循环控制

    4.1 for循环 Tips for loops 如果有固定次数,用for 如果必须执行一次,用do_while 其他情况用while 4.2 循环控制 break和continue 在循环前可以放一 ...

  8. 【Fiddler】开启手机的http或https抓包

    fiddler安装 下载fiddler最新版: 默认安装: 打开fiddler工具,默认界面: 选择上方,Tools-→options General界面 HTTPS界面 CONNECTIONS,po ...

  9. 如何在linux上部署vue项目

    安装nginx的前奏 安装依赖 yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-devel 创建一个文件夹 cd /usr/ ...

  10. 【Linux开发】【Qt开发】Qt界面键盘、触摸屏、鼠标的响应设置

    USB键盘 经过一番搜索,发现对Qt键盘的支持主要关系到两个方面: 1. 键盘类型确定: 4.7以前的Qt版本,如果是PS2圆孔键盘,Qt编译时需加上选项:-qt-kbd-vr41xx(未测试):如果 ...