欢迎投稿

今日深度:

Hive notes,

Hive notes,


hive commond:

1.hive -e “select * from mytable limit 3;
2.hive -S -e “select * from mytable limit 3” > /tmp/myquery
(no useless information like “OK Time taken:xxx seconds”)
3.hive -S -e ‘set’ | grep warehouse
(search hive ‘set’ information by bash commond)
4.hive -f /path/…/hsqlcommond.hql ——–bash commond
hive> source /path/…/hsqlcommond.hql ———-hive shell

Use hive -i filename;

1.first:search for filename.hiverc in $HIVE_HOME then excute the file;
eg:
set hive.cli.print.current.db=true; —–show current database
set hive.exec.mode.local.auto=true; ——-use local mode
set hive.cli.print.header=true —-show header

Execute bash shell commond in hive shell

hive>! echo “hello my best friend jackeylove4”;
hive>! pwd

Use hadoop dsf commond in hive shell (more efficient)

hive>dfs -ls /;
hive>dfs -put filepath hdfspath;

Hive script explain code:

--copyright (c) 2012.......
--This is the best Hive script ever!
select * from mytable;

www.htsjk.Com true http://www.htsjk.com/hive/34876.html NewsArticle Hive notes, hive commond: 1.hive -e “select * from mytable limit 3; 2.hive -S -e “select * from mytable limit 3” /tmp/myquery (no useless information like “OK Time taken:xxx seconds”) 3.hive -S -e ‘set’ | grep warehouse (sea...
相关文章
    暂无相关文章
评论暂时关闭