In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is to share with you what are the contents of Hive tips and commands. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Desc extended/formatted table; can view more detailed table information, such as data storage paths, field separators, and so on. The difference is that formatted is formatted information that is easier to read.
Set hive.fetch.task.conversion=more; or hive-- hiveconf hive.fetch.task.conversion=more can do some queries that don't start mapreduce job.
Add file ${path} / a.pytAdd file ${path} / b.py; can be abbreviated as: add file ${path} / a.py ${path} / b.py; (separated by spaces).
SELECT uid,COALESCE (sex,0) FROM TABLE; converts the value of sex field to NULL to 0, which is convenient for 0,1 processing.
You can modify the null descriptor through ALTER TABLE table_name SET SERDEPROPERTIES ('serialization.null.format'='');.
The array delimiter returned by collect_set, which comes with Hive, is\ x02.
Show tables'* a tables; filter tables with table names containing an in a regular way.
Concat_ws (',', collect_set (channel)) implements row swapping, and select col1, myCol2 from lateralview LATERAL VIEW explode (split (col2,',')) myTable1 as myCol2; implements column swapping. If you need to add where conditions, you need to put them after the as alias.
The hive query can also specify the delimiter: FIELDS TERMINATED BY'\ t 'when exporting data.
Hive- 0.12.0.tar.gz\ hive-0.12.0\ src\ ql\ src\ java\ org\ apache\ hadoop\ hive\ ql\ udf hive comes with the UDF source code path.
Set the priority queue for your submission of job: SET mapreduce.job.queuename=default.
The set hive.exec.parallel parameter controls whether job that has no dependencies in the same sql can run at the same time (hive.exec.parallel,hive.exec.parallel.thread.number).
UNIQUEJOIN:select.. From JOIN TABLES (A _ Magna B ·C) WITH KEYS (A.key, B.key, C.key) where....
Thank you for reading! This is the end of this article on "what are the skills and commands of Hive?". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.