Hive常用非交互式命令
[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常用非交互式命令的更多相关文章
- 两种Linux下非交互式命令的实现
一.概述 在Linux环境,有多种实现自己主动化的脚本语言.如Shell.Python.Perl.Tcl等. Shell语言因与Shell外壳结合紧密,是最常见的实现自己主动化的脚本语言. 同一时候, ...
- hadoop中hive常用的交互式操作
hive的帮助命令: [hadoop@master tmp]$ hive -help usage: hive -d,--define <key=value> Variable substi ...
- Hive:常用的一些命令
1.一般可以通过beeline,代理方式登录hive; 2.使用数据库abc_hive_db:use abc_hive_db; 3.查看数据库中有哪些表:show tables :有哪些特定表 sho ...
- Hive常用的SQL命令操作
Hive提供了很多的函数,可以在命令行下show functions罗列所有的函数,你会发现这些函数名与mysql的很相近,绝大多数相同的,可通过describe function functionN ...
- 安卓日常开发和逆向中常用的shell命令与非shell命令
简述shell 命令与 非shell命令区别 shell命令不用先adb shell进入界面执行 非shell命令必须要 adb shell进入界面执行 基础非shell命令 1.安装app adb ...
- mysql常用命令、非交互式mysql命令看29条
CentOS下mysql数据库常用命令总结1.更改root密码 mysqladmin -uroot password 'yourpassword' 2.远程登陆mysql服务器 mysql -uroo ...
- Hive 常用命令和语句
示例数据库为 db_hive 1. 创建表 create-table.sql create table if not exists db_hive.tb_user ( id int, username ...
- 1.10-1.11 hive交互式命令讲解
一.hive 交互式命令参数 #帮助 [root@hadoop-senior hive-0.13.1]# bin/hive -h Missing argument for option: h usag ...
- HIve常用CLI命令
1. 清楚屏幕:Ctrl+L 或者!Clear 最后加上分号 2. 查看数据仓库中的表:show tables; 3. 查看数据仓库中内置函数:show functions: 4. 查看表结构 :de ...
随机推荐
- 【Leetcode】对称二叉树
递归法 执行用时 :12 ms, 在所有 C++ 提交中击败了43.44%的用户 内存消耗 :14.6 MB, 在所有 C++ 提交中击败了95.56%的用户 /** * Definition for ...
- socket编程相关阐述
一.socket初识 ①服务端 import socket server = socket.socket() server.bind(('127.0.0.1', 8080)) server.liste ...
- csc.exeCPU100%
可以通过nuget把Microsoft.CodeDom.Providers.DotNetCompilerPlatform和Microsoft.Net.Compilers这两个包卸载
- 【Python】学习笔记十二:模块
模块(module) 在Python中,一个.py文件就是一个模块.通过模块,你可以调用其它文件中的程序 引入模块 先写一个first.py文件,内容如下: def letter(): print(' ...
- 每日踩坑 2019-08-23 button 元素点击后刷新页面
button标签按钮会提交表单. 解决方案: <button class="btn btn-primary" type="button" id=" ...
- 【重点突破】—— UniApp 微信小程序开发官网学习Two
一.使用Vue.js注意事项 Vue.js在uni-app中使用的差异: 新增:uni-app除了支持Vue实例的生命周期,还支持应用启动.页面显示等生命周期 受限:发布到H5时支持所有vue的语法, ...
- Linux_RHEL7_LDAP、Autofs服务
目录 目录 前言 LDAP 加入LDAP用户认证服务器 文件自动挂载服务autofs 前言 LDAP服务器,用作于网络用户的集中管理.在企业中员工的个人帐号一般采用集中管理的方式,在不同的系统平台上也 ...
- 【Struts2】工作流程
转发两篇文章 一个请求在Struts2框架中的处理分为以下几个步骤: 1.客户端发出一个指向servlet容器的请求(tomcat): 2.这个请求会经过图中的几个过滤器,最后会到达FilterDis ...
- linux系统高级命令进阶
输出重定向 >:覆盖文件内容 echo "123" > test:把原来的内容覆盖 echo "123" >> test:把原来的存在( ...
- Discrete Mathematics and Its Applications | 1 CHAPTER The Foundations: Logic and Proofs | 1.4 Predicates and Quantifiers
The statements that describe valid input are known as preconditions and the conditions that the outp ...