![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
hive
文章平均质量分 59
sf_www
这个作者很懒,什么都没留下…
展开
-
数据仓库与数仓建模
https://blog.csdn.net/qq_41018861/article/details/118085788?utm_source=app&app_version=5.0.1&code=app_1562916241&uLinkId=usr1mkqgl919blen转载 2022-02-06 23:09:00 · 91 阅读 · 0 评论 -
spark sql读写hive的过程
Spark sql读写hive需要hive相关的配置,所以一般将hive-site.xml文件放到spark的conf目录下。代码调用都是简单的,关键是源码分析过程,spark是如何与hive交互的。1. 代码调用读取hive代码原创 2022-01-17 16:13:01 · 8565 阅读 · 0 评论 -
Hive函数说明
官网地址:https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF下面列举几个有意思的函数1. stack(int r,T1 V1,...,Tn/r Vn)Breaks up n values V1,...,Vn into r rows. Each row will have n/r columns. r must be constant.是一个udtf函数。即分解n个值V1…Vn转化成r行。每一行将有n/r列(向上原创 2022-01-12 11:18:04 · 2016 阅读 · 0 评论 -
hive外部表和分区表注意事项
外部表操作注意事项1)分区数据建立外部表假设在/xhive/table1下有一些分区的数据,此时建立外部分区表:create external table table1(xxxx) partitioned by(date string) location “/xhive/table1”;这样子后,数据会查不出来。解决方法有两种:使用 msck repair table tbname;(推荐使用)或是需要手动添加已有的分区,alter table table1 add partition(d原创 2022-01-04 09:15:36 · 1887 阅读 · 0 评论 -
hive建表create table xxx as select的问题
create table xxx as select的方式创建的表默认存储格式是text,所以要注意了假如as select的是其他格式的比如parquet,则可能会导致一行变多行的情况(因为parquet格式的可能字段包含换行符等),所以必须要加上create table xxx stored as parquet as select...所以使用这种方式建表注意加上指定的存储格式。...原创 2020-09-18 16:39:50 · 5756 阅读 · 0 评论