<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[weixin_42474635的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/weixin_42474635</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; weixin_42474635]]></copyright><item><title><![CDATA[python获取当月最后一个周日的日期，超简单的一段代码，拒绝混乱复杂]]></title><link>https://blog.youkuaiyun.com/weixin_42474635/article/details/122843042</link><guid>https://blog.youkuaiyun.com/weixin_42474635/article/details/122843042</guid><author>weixin_42474635</author><pubDate>Wed, 09 Feb 2022 15:29:57 +0800</pubDate><description><![CDATA[思路，得到今天是周几，然后用今天的日期减去几
#获得N天前的日期
def get_past_days(n,formate=None):
    if formate is None:
       _ymd = (datetime.datetime.now() - datetime.timedelta(n)).__format__('%Y-%m-%d')
    else:
        _ymd = (datetime.datetime.now() - datetime.timedelta(n)).__]]></description><category></category></item><item><title><![CDATA[hive sum求和时是否考虑正负？是否会正负相抵?]]></title><link>https://blog.youkuaiyun.com/weixin_42474635/article/details/120993810</link><guid>https://blog.youkuaiyun.com/weixin_42474635/article/details/120993810</guid><author>weixin_42474635</author><pubDate>Wed, 27 Oct 2021 15:19:38 +0800</pubDate><description><![CDATA[最简单的测试方法
select sum(a),sum(b)
from(
    select 1 as a,2 as b
    union all
    select 1 as a,-2 as b
) t

查询结果显示

因此，hive  sum求和是考虑正负的。

]]></description><category></category></item><item><title><![CDATA[hive查询结果缺少数据——某些union all和join情况下会缺少数据]]></title><link>https://blog.youkuaiyun.com/weixin_42474635/article/details/120034497</link><guid>https://blog.youkuaiyun.com/weixin_42474635/article/details/120034497</guid><author>weixin_42474635</author><pubDate>Wed, 01 Sep 2021 10:39:21 +0800</pubDate><description><![CDATA[在使用hive sql 进行union all查询结果时，缺少数据
在使用hive sql 进行join 关联时,查询结果明显缺少数据，或于presto或其他查询渠道查询结果不一致时
原因可能是orc文件在加工过程中造成的部分元数据丢失，关闭元数据优化就可以了
set hive.optimize.index.filter=false;


...]]></description><category></category></item><item><title><![CDATA[aiflow灵活控制任务执行时间]]></title><link>https://blog.youkuaiyun.com/weixin_42474635/article/details/119543811</link><guid>https://blog.youkuaiyun.com/weixin_42474635/article/details/119543811</guid><author>weixin_42474635</author><pubDate>Mon, 09 Aug 2021 18:07:01 +0800</pubDate><description><![CDATA[大家应该都知道aiflow调度的周期是固定的，例如只能每周执行或者每月执行，但是如果既要周报又要月报呢或者是特殊的执行周期，这时候该怎么办呢？怎么样才能灵活的控制aiflow的调度周期呢？

总结，把aiflow设置为每天调起，然后把task写进if语句里，通过if语句对时间的灵活判断来决定任务是否真正执行
default_args = {
    'owner': '***',
    'depends_on_past': False,
    'ding_list': [''***.com'],
   ]]></description><category></category></item><item><title><![CDATA[hadoop集群搭建详细步骤——集群搭建]]></title><link>https://blog.youkuaiyun.com/weixin_42474635/article/details/106052476</link><guid>https://blog.youkuaiyun.com/weixin_42474635/article/details/106052476</guid><author>weixin_42474635</author><pubDate>Mon, 11 May 2020 17:57:13 +0800</pubDate><description><![CDATA[集群准备
一、虚拟机克隆
　　１、虚拟机关闭状态下右键点击虚拟机选择克隆
　　２、选择创建完整克隆，定义虚拟机名称和路径
　　３、点击完成等待虚拟机克隆　　　　　　　　　　　　　　　　　　至少克隆两台虚拟机
　　
二、克隆机网络设置
　　１、两台克隆机分别重新生成ＭＡＣ地址　　　　　　　
　　　具体步骤可见于上一篇的系统准备　https://blog.youkuaiyun.com/weixin_42474635/article/details/106019204
　　２、两台克隆机分别使用root账户登录并设置静态IP]]></description><category></category></item><item><title><![CDATA[hadoop集群搭建详细步骤——系统准备]]></title><link>https://blog.youkuaiyun.com/weixin_42474635/article/details/106019204</link><guid>https://blog.youkuaiyun.com/weixin_42474635/article/details/106019204</guid><author>weixin_42474635</author><pubDate>Mon, 11 May 2020 11:04:27 +0800</pubDate><description><![CDATA[所需工具：VMwhere虚拟机、hadoop-2.7.7.tar.gz、jdk-8u201-linux-x64.tar.gz、CentOS-7-x86_64-DVD-1708.iso（具体的版本随意）
一、系统准备
一、创建虚拟机
1、点击文件选择新建虚拟机，选择典型安装
2、修改路径选择centos镜像
3、定义虚拟机的名称和存储路径
4、指定磁盘容量和存储方式（磁盘容易默认就可以，存储方式选择单个存储）
5、自定义硬件
内存和处理器根据个人电脑选择
网络适配器选择NAT模式，并生成MAC地址  重点

]]></description><category></category></item><item><title><![CDATA[scala做字符串反转]]></title><link>https://blog.youkuaiyun.com/weixin_42474635/article/details/105288542</link><guid>https://blog.youkuaiyun.com/weixin_42474635/article/details/105288542</guid><author>weixin_42474635</author><pubDate>Fri, 03 Apr 2020 11:06:15 +0800</pubDate><description><![CDATA[val oldStr = “1234”
        var newStr = ""
        for ( i&lt;-0 until oldStr.length)
           newStr = oldStr.charAt(i) +newStr


]]></description><category></category></item><item><title><![CDATA[shell脚本编写循环hive sql]]></title><link>https://blog.youkuaiyun.com/weixin_42474635/article/details/103511512</link><guid>https://blog.youkuaiyun.com/weixin_42474635/article/details/103511512</guid><author>weixin_42474635</author><pubDate>Thu, 12 Dec 2019 16:36:37 +0800</pubDate><description><![CDATA[循环里日期判断
if [ $# -eq 1 ]; then
     n_date=`date -d "$1" +"%Y-%m-%d"`
else
     n_date=`date -d " -1 days" +"%Y-%m-%d"`
fi
t_date=`date -d "${n_date} -6 days" +"%Y-%m-%d"`

until [ $t_date == $n_date ]...]]></description><category></category></item><item><title><![CDATA[join语句里where条件的编写如何避免笛卡儿积的生成]]></title><link>https://blog.youkuaiyun.com/weixin_42474635/article/details/103488915</link><guid>https://blog.youkuaiyun.com/weixin_42474635/article/details/103488915</guid><author>weixin_42474635</author><pubDate>Wed, 11 Dec 2019 11:08:59 +0800</pubDate><description><![CDATA[实验表二十万条数据
select date,id,name from a
join b on a.id=b.id
where a.date='2019-12-05' and b.date='2019-12-05'


select date,id,name from a
join b on a.id=b.id
where a.date='2019-12-05'`    ---运行速度快
``
第一...]]></description><category></category></item><item><title><![CDATA[HiveSql 日期格式转换]]></title><link>https://blog.youkuaiyun.com/weixin_42474635/article/details/103457231</link><guid>https://blog.youkuaiyun.com/weixin_42474635/article/details/103457231</guid><author>weixin_42474635</author><pubDate>Mon, 09 Dec 2019 14:32:48 +0800</pubDate><description><![CDATA[获取当前时间并转换为yyyy-mm-dd的格式
select from_unixtime(unix_timestamp(),'yyyy-MM-dd')
select from_unixtime(unix_timestamp(),'yyyyMMdd')      //这里的MM必须大写

yyyymmdd格式转换为yyyy-mm-dd
regexp_replace('$n_date','-',"")...]]></description><category></category></item><item><title><![CDATA[sum() over()求累加数据]]></title><link>https://blog.youkuaiyun.com/weixin_42474635/article/details/103366901</link><guid>https://blog.youkuaiyun.com/weixin_42474635/article/details/103366901</guid><author>weixin_42474635</author><pubDate>Tue, 03 Dec 2019 14:42:53 +0800</pubDate><description><![CDATA[使用函数sum() over()函数求累加数据
          SELECT 
                dd
                ,f_capital_no
                ,sum(t.f_payout_amount) over(partition by f_capital_no order by dd) f_payout_amount
         ...]]></description><category></category></item><item><title><![CDATA[case when 使用技巧汇总]]></title><link>https://blog.youkuaiyun.com/weixin_42474635/article/details/103164567</link><guid>https://blog.youkuaiyun.com/weixin_42474635/article/details/103164567</guid><author>weixin_42474635</author><pubDate>Wed, 20 Nov 2019 16:47:41 +0800</pubDate><description><![CDATA[作为字段单种情况时使用：
case when r.f_status='1' then 1  else '0' end as s_f_status

作为字段多种情况时使用：
case  when f_product_code in('5561','5560','5811','5821','5901','5002','5921') then '公积金'   
         when f_prod...]]></description><category></category></item><item><title><![CDATA[spark学习笔记]]></title><link>https://blog.youkuaiyun.com/weixin_42474635/article/details/102552069</link><guid>https://blog.youkuaiyun.com/weixin_42474635/article/details/102552069</guid><author>weixin_42474635</author><pubDate>Mon, 14 Oct 2019 17:19:21 +0800</pubDate><description><![CDATA[Spark的构成
Spark Core(spark核心)
Spark Sql(操作结构化数据的组件)支持多数据源
Spark Streaming  实时流计算
MLlib机器学习
GraphC   面向图计算的框架和算法库
spark的三种模式
standalone  apacheMersos    hadoopYarn
sparkSession 包括 SparkContext  sql_  hi...]]></description><category></category></item><item><title><![CDATA[那些年我们写过的雷人简历]]></title><link>https://blog.youkuaiyun.com/weixin_42474635/article/details/101539776</link><guid>https://blog.youkuaiyun.com/weixin_42474635/article/details/101539776</guid><author>weixin_42474635</author><pubDate>Fri, 27 Sep 2019 15:54:31 +0800</pubDate><description><![CDATA[别说什么行业不景气，工作不好找，真的是你的简历太雷人


]]></description><category></category></item><item><title><![CDATA[hive配置优化及其详解]]></title><link>https://blog.youkuaiyun.com/weixin_42474635/article/details/101440702</link><guid>https://blog.youkuaiyun.com/weixin_42474635/article/details/101440702</guid><author>weixin_42474635</author><pubDate>Thu, 26 Sep 2019 14:22:32 +0800</pubDate><description><![CDATA[hive配置优化及其详解]]></description><category></category></item><item><title><![CDATA[Hive-sql对IFNULL()函数的替换]]></title><link>https://blog.youkuaiyun.com/weixin_42474635/article/details/101028407</link><guid>https://blog.youkuaiyun.com/weixin_42474635/article/details/101028407</guid><author>weixin_42474635</author><pubDate>Fri, 20 Sep 2019 09:14:46 +0800</pubDate><description><![CDATA[mysql里的函数：
1.LEFT()
函数是一个字符串函数，它返回具有指定长度的字符串的左边部分。
LEFT(Str,length);   LEFT(“1234”,2)
接收两个参数：str：一个字符串；length：想要截取的长度，是一个正整数；
2.IFNULL()
函数用于判断第一个表达式是否为 NULL，如果为 NULL 则返回第二个参数的值，如果不为 NULL 则返回第一个参数的值。
...]]></description><category></category></item><item><title><![CDATA[hive侧视图lateral view和explode用法-简解（列转行）]]></title><link>https://blog.youkuaiyun.com/weixin_42474635/article/details/100553662</link><guid>https://blog.youkuaiyun.com/weixin_42474635/article/details/100553662</guid><author>weixin_42474635</author><pubDate>Thu, 05 Sep 2019 13:50:34 +0800</pubDate><description><![CDATA[explode用法
select explode(split("010029,010030,1000001,财富_顶部轮播,财富banner,财富货币资金产品,财富快捷,财富-稳健组合楼层,财富-稳健组合楼层头条,财富-稳健组合推荐产品,财富页三图,财富-专业投资楼层,财富-专业投资推荐产品,首页登录banner,首页登录明星,首页登录头条,首页登录推荐产品,首页-浮层广告,首页快捷,首页明星服务...]]></description><category></category></item><item><title><![CDATA[scala学习笔记1]]></title><link>https://blog.youkuaiyun.com/weixin_42474635/article/details/99960452</link><guid>https://blog.youkuaiyun.com/weixin_42474635/article/details/99960452</guid><author>weixin_42474635</author><pubDate>Wed, 21 Aug 2019 16:05:58 +0800</pubDate><description><![CDATA[match语句的用法实例
def isWeekend(wd:WeekDay.Value):Boolean={
     |   wd match{
     |     case WeekDay.Saturday =&gt;true
     |     case WeekDay.Sunday =&gt;true
     |     case _ =&gt;false
     |   }
  ...]]></description><category></category></item><item><title><![CDATA[Display all 495 possibilities? (y or n)—— linux环境下脚本执行问题的解决]]></title><link>https://blog.youkuaiyun.com/weixin_42474635/article/details/99944789</link><guid>https://blog.youkuaiyun.com/weixin_42474635/article/details/99944789</guid><author>weixin_42474635</author><pubDate>Wed, 21 Aug 2019 11:07:16 +0800</pubDate><description><![CDATA[Display all 495 possibilities? (y or n)
今天在把自己写的脚本放到azkaban上遇到了这么一个错误，在hue里执行没有问题，放到azkaban上就这样了，本来以为是linux和windows环境换行符的问题呢，结果把CRLF转换为LF也不行。
最后发现原来是tab键的问题，因为存在tab键，linux就会出现这样的问题，所有把tab键去掉就好了
那么怎么去掉...]]></description><category></category></item><item><title><![CDATA[row_number() over()、sum() over()——hive窗口函数用法详解]]></title><link>https://blog.youkuaiyun.com/weixin_42474635/article/details/99574789</link><guid>https://blog.youkuaiyun.com/weixin_42474635/article/details/99574789</guid><author>weixin_42474635</author><pubDate>Wed, 14 Aug 2019 15:42:01 +0800</pubDate><description><![CDATA[语法格式：row_number() over(partition by 分组列 order by 排序列 desc)
row_number() over()分组排序功能：
在使用 row_number() over()函数时候，over()里头的分组以及排序的执行晚于 where 、group by、  order by 的执行

版权声明：本文为优快云博主「一彡十」的原创文章，遵循CC 4.0...]]></description><category></category></item></channel></rss>