[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. 【C++】关键字struct

    网址连接 https://www.cnblogs.com/zhengfa-af/p/8144786.html 主要内容: 1. C语言中,结构体的3中不同声明和定义方式: 2. struct在C和C+ ...

  2. Oracle数据库表空间创建、添加用户并授权

    --创建test表空间CREATE TABLESPACE test_data LOGGING DATAFILE '/u01/app/oracle/oradata/test/test_data.dbf' ...

  3. wannalfy 挑战赛8 F 白云的树(树形dp)

    链接:https://www.nowcoder.com/acm/contest/57/F 时间限制:C/C++ 2秒,其他语言4秒 空间限制:C/C++ 262144K,其他语言524288K 64b ...

  4. android UI设计及开发

    一.viewPager实现左右滑动及导引功能 1,如果每个屏幕只是一个简单的布局,如果简单的话,定义一个arraryIist<View>,利用addview将所有的布局加载, 然后为vie ...

  5. shell命令别名

    ~/.bashrc文件 [root@linuxzgf ~]# vi ~/.bashrc            在alias cp='cp -i'前加上"#"注释,重新登录即可实现复 ...

  6. win10 配置tensorflow环境

    1. 在anaconda中新增环境 python3.5, 我使用的是anaconda-navigator 中新增的环境,python版本选择3.5 2. 激活新增加的环境, 注意win下,没有sour ...

  7. C# WPF 擦出效果,刮图效果

    找了很久 <Window x:Class="TestWebbowser.TestMaskWind" xmlns="http://schemas.microsoft. ...

  8. 前端需要注意哪些SEO

    1.合理的title.description.keywords:搜索对这三项的权重逐个减小,title值强调重点即可,重要关键词不要超过2次,而且要靠前,不同页面title要有所不同:descript ...

  9. 阶段3 1.Mybatis_07.Mybatis的连接池及事务_1 今日课程内容介绍

  10. diff()函数

    1 diff()是将原来的数据减去移动后的数据. 在numpy和pandas中都能调用. pandas的调用方法: import pandas as pd df = pd.DataFrame( {'a ...