思路:主要是看每门课程下,每个分数比该课程所有分数小的有几个 保留名次空缺: select a.cid, a.sid, a.score , count(a.score<b.score)+1 as rank from sc a left join sc b on a.cid=b.cid and a.s ...
分类:
数据库 时间:
2020-06-24 23:26:42
阅读次数:
132
Broadcast Join 适合情况,小表和大表,小表非常小,适合传播到各个节点。 当大表小表连接时,为了避免Shuffle,我们可以将小表广播到各个节点内存,供大表连接。一定程度上牺牲了空间,避免了Shuffle。这种Join在Spark中称作Broadcast Join。(需要注意的点是广播的 ...
分类:
其他好文 时间:
2020-06-24 16:28:44
阅读次数:
53
1 def _parse_known_args(self, arg_strings, namespace): 2 # replace arg strings that are file references 3 if self.fromfile_prefix_chars is not None: 4 ...
分类:
其他好文 时间:
2020-06-24 14:04:54
阅读次数:
54
--导数据 MergeMERGE os_staff AS t USING (select ear_code,sta_code,sta_pwd,sta_name,sta_dpt_code,job_code,sta_join_date,sta_sex,sta_status from ITSV123.hi ...
分类:
数据库 时间:
2020-06-24 13:54:50
阅读次数:
69
1.创建视图 语法:create view 视图名 as 查询语句 实例: -- 以上节课的关联查询为例 create view v_user_score as select a.id, a.name, b.math, b.english from student a inner join scor ...
分类:
其他好文 时间:
2020-06-23 21:43:21
阅读次数:
55
概述 业务之间有时候需要ftp或者sftp 去进行数据交互,sftp 相比于ftp 更安全,其实就是基于ssh 的一种加密传输协议。 应用场景 创建一个目录,用于两个业务之间通过sftp 数据交互,提供两个账号,一个读写,另一个只读权限。 用户1: app-r/123456 (只读) 用户2: ap ...
分类:
其他好文 时间:
2020-06-23 15:22:00
阅读次数:
72
1.概述:全文搜索属于最常见的需求,开源的 Elasticsearch (以下简称 Elastic)是目前全文搜索引擎的首选。Elastic 的底层是开源库 Lucene。但是,你没法直接用 Lucene,必须自己写代码去调用它的接口。Elastic 是 Lucene 的封装,提供了 REST AP ...
分类:
Web程序 时间:
2020-06-23 15:02:00
阅读次数:
62
采集数据到HDFS 安装flume在虚拟机hdp-1中, 打开SFTP-hdp-1窗口,将fllume压缩包导入到虚拟机hdp-1的/root/目录中. 解压flume压缩包到/root/apps/下,命令: tar -xvzf apache-flume-1.6.0-bin.tar.gz -C ap ...
分类:
其他好文 时间:
2020-06-23 13:03:55
阅读次数:
59
# Series 以为,带标签数组 # DataFrame二维,Series容器 import string import pandas as pd import numpy as np # t = pd.Series(np.arange(10), index=list(string.ascii_u ...
分类:
其他好文 时间:
2020-06-22 23:16:15
阅读次数:
66