
hive
文章平均质量分 54
hive相关的内容
shy_01
真正的优秀是习惯的优秀。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
hive元数据库rds查询
查询元数据信息原创 2023-01-18 17:40:45 · 1012 阅读 · 0 评论 -
批操作hive
一、添加分区一、添加分区目录不存在时,会生成空目录;防止生成空目录。原创 2022-05-19 22:05:12 · 830 阅读 · 0 评论 -
本地文件加载到hive表
1文件上传到服务器(xftp)2服务器上的文件上传到s31)上传文件awss3cplocal_file_names3://transsion-bigdata-warehouse/test/shy/upload/upload.txt2)查看是否上传成功awss3lss3://transsion-bigdata-warehouse/test/shy/upload/3启动spark-sql读取s3文件,数据写入表中...原创 2021-04-01 20:30:51 · 1350 阅读 · 1 评论 -
hive表加载数据的方式
1 直接insert到表中 1) insert into table tgt_table partition(dt='20210107') select name,age from tmp; 2) insert overwrite table tgt_table partition(dt='20210107') select name,age from tmp; 3) insert into table tgt_table partition(dt='20210107') value...原创 2021-01-07 14:11:51 · 381 阅读 · 0 评论 -
spark直接写hive表速度慢
1. sparksql动态分区直接写入hive表速度慢1 动态写入速度慢的sqlset hive.exec.dynamic.partition.mode=nonstrict;insert overwrite table ssjt_test partition(dt) select a,dt from ssjt.test2 where dt>='20200801';2. 文件方式写入后, alter方式添加分区1) 过滤出要删除的目录;2) 删除要重新覆盖的目录;3) 文件方式写入(原创 2020-10-15 11:52:01 · 3956 阅读 · 0 评论 -
spark读取hive表异常
1 原因为了性能spark对元数据做了缓存,如果外部系统更新了元数据,spark使用时要更新缓存过的该表元数据./*** Invalidates and refreshes all the cached data and metadata of the given table. For performance* reasons, Spark SQL or the external data source library it uses might cache certain metadata原创 2020-10-10 17:31:23 · 2961 阅读 · 0 评论 -
hive使用笔记
一、 相关参考一、 相关参考二、 内置函数1. 字符串操作字符串函数rlike,like,not like使用详解正则表达式2. 进制转换string三、 多表指向同一份数据1) 创建外表,指向同一个数据源,修复分区(或添加分区);2) 创建视图;使用正则方法查找库名或表名五、 hive参数设置对于分区较多或文件较多的表,清空数据或删除表时速度很慢, 可以先删元除数据再删除数据,即内表转外表删除元数据后再删除底层数据;原创 2020-06-07 08:52:45 · 1652 阅读 · 0 评论 -
获取hive表最新分区时间
1 shell实现方式#!/usr/bin/env bashsource ~/.bashrc# 获取hive表最新分区时间函数function getNewestDate() { # 获取(库名.表名) local database_table_name=${1} # hive命令获取所有分区, 降序排列后(shell命令排序, 去掉了hive命令的re...原创 2020-04-05 12:12:30 · 4724 阅读 · 1 评论