github_log 这个得到的数据里实际上有一些重复的数据,这些行所有的字段都一样,但是created_at 却差个几秒钟,导致出现数据重复。
查表:
set odps.sql.validate.orderby.limit=false;
SELECT
actor_id,
repo_id,
created_at,
push_id,
push_size,
push_ref,
push_head,
push_before
from ods_github_log_m
where pt='20200301' and push_id in
(
SELECT
push_id
from ods_github_log_m
where type='PushEvent' and pt='20200301'
GROUP by
actor_id,
repo_id,
push_id
HAVING count(*) > 1
order by push_id
)
order by push_id
;
按道理,一个push_id 决定了一次push,因此不会一个push_id 对应出现多个push记录,但是实际查表发现。。。
再一次感叹,日志数据就是不靠谱啊啊!