开发者学堂课程【新电商大数据平台2020最新课程:电商项目之 DWD 用户产品关注表 SQL 分析】学习笔记,与课程紧密联系,让用户快速学习知识。
课程地址:https://developer.aliyun.com/learning/course/640/detail/10530
电商项目之 DWD 用户产品关注表 SQL 分析
目录:
用户产品关注表
分析
一、用户产品关注表
ods_nshop.ods_01_useractlog)
create external table if not exists dwd_nshop.dwd_actlog_product_comment(
user_id string comment‘用户 id',
device_num string comment‘设备号’,
device_type string comment'设备类型’,
os string comment‘手机系统’,
os_version string comment‘手机系统版本’,
manufacturer string comment‘手机制造商’,
carrier string comment‘电信运营商’,
network_type string comment‘网络类型’,
area_code string comment‘地区编码’,
target_id string comment‘产品 ID//
ct bigint comment‘产生时间’
)partitioned by (bdp_day string)
stored as parquet
location‘/data/nshop/dwd/user/dwd_actlog_product_comment/"
target_id string comment‘产品 ID//
05过后,需要选择02事件,点击事件类型,也就是关注数据。
找到 target_action:product 产品+[关注01,点赞02,03回复],这个数据里默认选择04,不需要改变。
二、分析
1. 先找行为事件05
2. 再点击02
3. 再找到产品,以及产品里的关注01,这样才能拿到真正的数据,
是用户的关注表数据。
依次去找,很多数据需要看到文档中的规则,包括它代表的参数的含义,去找到对应的点的数据。