对业务新增用户收集入库的行为,需要开发。
首先第一个,小问题。



如所见,报错原因是多了一个;分号,导致了我们把方式换来换去,到后来我才看到,原来不能加引号啊,但是我把时间变量替换成时间常量却可以编译通过,这是个坑,陨石巨坑。
第二个问题,当我们跑任务时,定时的,但是兄弟部门数据没来,我们用开源HUE去检查hive库该表的数据时间,

然后显示分区,

就对比这两个分区时间数据吧。

可以很清楚看到,

18好的数据是19号早上10点47跑完的。接着去看看17号的。

17号数据就是18号晚上8点47跑完的,还记我们之前定的是下午两点15,所以这里会导致前台业务系统空数据,也会调度空数据的。

第三个问题,也是纠缠了一天的问题了。
为什么每次我sql没问题,日志没问题,



为什么会出现这种情况呢?但是库里却明明有数据的。

比较棘手了。
都不好意思截图了,原来是变量别名没有取,导致了表不认识。
好吧,现在可以了,我们的分析都取得了成功,接下来,需要做前端数据库设计。因为是下载和销量双重设计,我们从前端数据库也整两张表吧,在接口代码里面改就可以了。
我靠时间来到了快下班的时间了,
要个增加表的权限,要了一圈,。。。要了3个小时。。。。
太影响效率了。。。呜呜呜
然后接着开发,我们表创建好了之后,

接下来的事情就坑了:他给我创建的用户,尼玛,

居然不可以insert数据,我曹!

到这里还有一个坑。
数据现在18号的有两条,

因为只是数据字典,所以没有设置id,只要保证数据不重复就行了,即使重复了,也可以sql找到重复记录。所以,如果我们id匹配维度没有配齐的话,比方说。

跑一边看一下,

只有一条记录了,因为kettle不知道更新的维度。所以,写全了这里。
其实关于开发这个调度,由于是第一次这么从头开发到尾,整合,所以吧,也遇到了不少坑,那些小坑都倒腾倒腾也就过了,就不记了,遇到了那在记吧。

接下来,我们要做初始数据。向下载表、销量表里插入初始数据,partition为当天把。
初始数据插入好了,需要些python脚本了,也就是最简单的脚本形式:

然后传到服务器上,改权限:

再然后nohup,出现问题,没有东西出来,看一下目录。

然后执行python XXXx.py

原来是因为导包,导入类引用没找到,那这里因为不在一个目录下面,所以需要去网上现学。这到没啥问题,干这行就得习惯无时无刻都要遇到阻碍,我们网上查阅资料添加import即可

到这里就启动了,等待邮件,要发不久的。等吧。
吧唧打脸了,

又报错了,好尴尬啊,我们去kitchen里面测试吧。还好前两天写了这么多文档,现在解决问题起来,不用重新踏坑了,直接查文档,只可惜微博只让保存10篇,超过了就不行了,所以我把博客文档迁到了csdn,嘿嘿,没有限制了。其实自己搭建博客网站也是可以的,200,300一年吧,整个域名,搭建一个自己的博客网站。都很想搞一搞呀。扯远了,继续来吧,
pwd看一下目录

然后

是老问题了。还记得吗,是因为我们没有切换hive用户导致的,
su hive

完美吗?好了,这篇就先到这里吧,关于springBoot怎么开发,以前的文章也都写过了,也比较简单。
我们回头把那个root启动的进程杀死

nohup python freemeos_newadd_customer.py >freemeos_newadd_customer_log.log 2>&1 &

搞定了。
其实,打算把那个短信的mapreduce拿出来说一说的,但是似乎没时间了,二期需求来了。现在市场的需要重新做,还要搭建PHP运行环境去做一些开发。。。也一直有打算把以前的三个javaWeb开发项目拿出来说一说,说说框架、开发的,也打算把Kafka搭建一下,把思想说一说,拿出来分享的,慢慢来吧,技术的道路需要永无止境的探索。
