![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
hive
emmajinxin
程序媛,算法攻城狮
展开
-
【presto & hive 对比4】获取数组长度
如何获取数组长度呢?hive: size 函数presto: cardinality函数--数据表 test_tb --字段 user_ids, 为逗号分隔的用户id--hive size函数select size(split(user_ids,',')) from test_tb-- prestoselect cardinality(split(user_ids,',')) from test_tbps: hive的数组index从0开始 presto的数组index从1开始原创 2021-04-30 21:26:23 · 1304 阅读 · 1 评论 -
hive查看当前参数设置
hive调整参数过程中,有时候看下默认参数还是有必要的,那么如何查看默认参数呢?set : 查看所有参数set 参数: 查看参数当前值参考 https://www.cnblogs.com/carltmf/p/13191392.html原创 2020-09-30 18:21:37 · 4121 阅读 · 0 评论 -
hive修改location
hive> alter table wms_c_wlsydmx set location '/user/hive/warehouse/zwpdb.db/wms_c_wlsydmx1' > ;FAILED: Error in metadata: /user/hive/warehouse/zwpdb.db/wms_c_wlsydmx1 is not ab...转载 2018-12-04 16:58:13 · 4162 阅读 · 0 评论 -
Warning: Value had a \n character in it.
执行hive sql时遇到此问题,问题原因: set 参数设置后少了分号原创 2019-06-13 10:59:10 · 1278 阅读 · 0 评论 -
python udf 读取hive 传入的map & python udf 返回hive map
参考:hive之Python UDF函数操作map数据 详解 全是干货 - colby_chenlun的博客 - CSDN博客 https://blog.csdn.net/colby_chenlun/article/details/78140033str_to_map hive 字符串转为map格式 - yuanyangsdo的博客 - CSDN博客 https://blog.csdn.net...原创 2019-09-11 15:03:51 · 1195 阅读 · 0 评论 -
hive 将json格式的字符串取值或转为map格式
1. 取值:SELECT get_json_object(字段名,'$.json_key_value')--,--get_json_object(get_json_object(ad_test_group,'$.2019-09-cid2_1342_1276'),'$.group_id')fromtable_namewhere dt= '2019-09-21'2. st...原创 2019-09-25 23:45:47 · 4403 阅读 · 0 评论