hive使用变量
来源:互联网 发布:html是不是编程语言 编辑:程序博客网 时间:2024/06/07 10:53
使用set设置变量
hive> set name=lucy; hive> set name;name=lucyhive> select * from employee where name='${hiveconf:name}';Total jobs = 1Launching Job 1 out of 1Number of reduce tasks is set to 0 since there's no reduce operatorStarting Job = job_1471442913162_0001, Tracking URL = http://ubuntu:8088/proxy/application_1471442913162_0001/Kill Command = /app/bigdata/hadoop-2.7.2/bin/hadoop job -kill job_1471442913162_0001Hadoop job information for Stage-1: number of mappers: 1; number of reducers: 02016-08-18 19:25:50,915 Stage-1 map = 0%, reduce = 0%2016-08-18 19:26:00,758 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 1.64 secMapReduce Total cumulative CPU time: 1 seconds 640 msecEnded Job = job_1471442913162_0001MapReduce Jobs Launched: Job 0: Map: 1 Cumulative CPU: 1.64 sec HDFS Read: 374 HDFS Write: 90 SUCCESSTotal MapReduce CPU Time Spent: 1 seconds 640 msecOKlucy 11000.0 ["tom","jack","dave","kate"] {"tom":1200.0,"jack":1560.0} {"street":"beijing","city":"changanjie","state":"xichengqu","zip":10000}Time taken: 28.615 seconds, Fetched: 1 row(s)
使用系统变量
root@ubuntu:~# envXDG_SESSION_ID=13TERM=xtermSHELL=/bin/bash……HOME=/rootLANGUAGE=en_US:LOGNAME=root……
employee有两条数据,打印两条
hive> select '${env:HOME}' from employee;Total jobs = 1Launching Job 1 out of 1Number of reduce tasks is set to 0 since there's no reduce operatorStarting Job = job_1471442913162_0002, Tracking URL = http://ubuntu:8088/proxy/application_1471442913162_0002/Kill Command = /app/bigdata/hadoop-2.7.2/bin/hadoop job -kill job_1471442913162_0002Hadoop job information for Stage-1: number of mappers: 1; number of reducers: 02016-08-18 19:30:19,926 Stage-1 map = 0%, reduce = 0%2016-08-18 19:30:29,449 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 1.2 secMapReduce Total cumulative CPU time: 1 seconds 200 msecEnded Job = job_1471442913162_0002MapReduce Jobs Launched: Job 0: Map: 1 Cumulative CPU: 1.2 sec HDFS Read: 374 HDFS Write: 12 SUCCESSTotal MapReduce CPU Time Spent: 1 seconds 200 msecOK/root/rootTime taken: 24.098 seconds, Fetched: 2 row(s)
0 0
- hive使用变量
- Hive下的变量使用
- Hive下的变量使用
- Hive下变量的使用
- hive下变量的使用
- hive 变量
- Hive开发中使用变量的两种方法
- spark sql 中 hive变量的使用记录
- Hive程序传递变量
- hive变量传递
- hive 变量替换
- Hive使用
- hive 使用
- Hive 使用
- 使用Hive
- hive的变量传递设置
- Hive语言手册之二:变量替换
- hive变量传递的源码实现
- poj 1837 Balance
- 【POJ3264】Balanced Lineup
- UVA - 11234 Expressions
- 2016.08.18【初中部 NOIP普及组 】模拟赛题解
- stm32引脚默认状态
- hive使用变量
- 第八章 多态 多态的优点与作用 和缺陷
- 理解 iOS 的内存管理
- 序列中增序列的最大个数
- Python 中的循环与 else
- 关于Rs485通信只能接收不能发送的问题
- CentOS和WIN7双系统时间错误
- poj 3314 Plaque Pack, 模拟
- 拓扑排序