电商用户之用户画像数据开发5-6-客户属性信息表
2018-03-08 00:02
661 查看
--用户画像--客户属性信息表
drop table if exists gdm.gdm_user_portrait_basic;
CREATE EXTERNAL TABLE gdm.gdm_user_portrait_basic(
user_id bigint ,--用户ID
user_name string ,--用户登录名
user_sex string ,--性别
user_birthday string ,--生日
user_age bigint ,--年龄
constellation string ,--星座
big_area_name string ,--大区域
province string ,--省份
city string ,--城市
city_level string ,--城市等级
hex_mail string ,--邮箱
op_mail string ,--邮箱运营商
hex_phone string ,--加密手机
fore_phone string ,--手机前几位
op_phone string ,--手机运营商
add_time string ,--注册时间
login_ip string ,--登陆IP地址
login_source string ,--登录来源
request_user string ,--邀请人
total_mark bigint ,--会员积分
used_mark bigint ,--已使用积分
level_name string ,--会员等级名称
blacklist bigint ,--用户黑名单
is_married bigint ,--婚姻状况
education string ,--学历
monthly_income bigint ,--月收入
profession string ,--职业
sex_model bigint ,--性别模型
is_pregnant_woman bigint ,--是否孕妇
is_have_children bigint ,-- 是否有小孩
children_sex_rate double ,--孩子性别概率
children_age_rate double ,--孩子年龄概率
is_have_car bigint ,--是否有车
potential_car_user_rate double ,--潜在汽车用户概率
phone_brand string ,--使用手机品牌
phone_brand_level string ,--使用手机品牌档次
phone_cnt bigint ,--使用多少种不同的手机
change_phone_rate bigint ,--更换手机频率(月份)
majie_flag string ,--马甲标志
majie_account_cnt bigint ,--马甲账号数量
loyal_model bigint ,--用户忠诚度
shopping_type_model bigint ,--用户购物类型
figure_model bigint ,--身材
stature_model bigint ,--身高
dw_date timestamp
)
partitioned by
(dt string)
;
#***************************************************************
#文件名称: gdm_user_portrait_basic.sql
#
#****************************************************************
insert overwrite table gdm.gdm_user_portrait_basic partition(dt = '2015-01-01')
select
t.user_id bigint ,--用户ID
t.user_name string ,--用户登录名
t.user_sex string ,--性别
t.user_birthday string ,--生日
t.user_age bigint ,--年龄
t.constellation string ,--星座
t.big_area_name string ,--大区域
t.province string ,--省份
t.city tring ,--城市
t.city_level string ,--城市等级
t.hex_mail string ,--邮箱
t.op_mail string ,--邮箱运营商
t.hex_phone string ,
a51a
--加密手机
t.fore_phone string ,--手机前几位
t.op_phone string ,--手机运营商
t.add_time string ,--注册时间
t.login_ip string ,--登陆IP地址
t.login_source string ,--登录来源
t.request_user string ,--邀请人
t.total_mark bigint ,--会员积分
t.used_mark bigint ,--已使用积分
t.level_name string ,--会员等级名称
t.blacklist bigint ,--用户黑名单
t.is_married bigint ,--婚姻状况
t.education string ,--学历
t.monthly_income bigint ,--月收入
t.profession string ,--职业
null sex_model bigint ,--性别模型
null is_pregnant_woman bigint ,--是否孕妇
null is_have_children bigint ,-- 是否有小孩
null children_sex_rate double ,--孩子性别概率
null children_age_rate double ,--孩子年龄概率
null is_have_car bigint ,--是否有车
null potential_car_user_rate double ,--潜在汽车用户概率
null phone_brand string ,--使用手机品牌
null phone_brand_level string ,--使用手机品牌档次
null phone_cnt bigint ,--使用多少种不同的手机
null change_phone_rate bigint ,--更换手机频率(月份)
null majie_flag string ,--马甲标志
null majie_account_cnt bigint ,--马甲账号数量
null loyal_model bigint ,--用户忠诚度
null shopping_type_model bigint ,--用户购物类型
null figure_model bigint ,--身材
null stature_model bigint ,--身高
from_unixtime(unix_timestamp()) dw_date
from (select * from fdm.fdm_user_wide where dt ='2015-01-01') t
;
drop table if exists gdm.gdm_user_portrait_basic;
CREATE EXTERNAL TABLE gdm.gdm_user_portrait_basic(
user_id bigint ,--用户ID
user_name string ,--用户登录名
user_sex string ,--性别
user_birthday string ,--生日
user_age bigint ,--年龄
constellation string ,--星座
big_area_name string ,--大区域
province string ,--省份
city string ,--城市
city_level string ,--城市等级
hex_mail string ,--邮箱
op_mail string ,--邮箱运营商
hex_phone string ,--加密手机
fore_phone string ,--手机前几位
op_phone string ,--手机运营商
add_time string ,--注册时间
login_ip string ,--登陆IP地址
login_source string ,--登录来源
request_user string ,--邀请人
total_mark bigint ,--会员积分
used_mark bigint ,--已使用积分
level_name string ,--会员等级名称
blacklist bigint ,--用户黑名单
is_married bigint ,--婚姻状况
education string ,--学历
monthly_income bigint ,--月收入
profession string ,--职业
sex_model bigint ,--性别模型
is_pregnant_woman bigint ,--是否孕妇
is_have_children bigint ,-- 是否有小孩
children_sex_rate double ,--孩子性别概率
children_age_rate double ,--孩子年龄概率
is_have_car bigint ,--是否有车
potential_car_user_rate double ,--潜在汽车用户概率
phone_brand string ,--使用手机品牌
phone_brand_level string ,--使用手机品牌档次
phone_cnt bigint ,--使用多少种不同的手机
change_phone_rate bigint ,--更换手机频率(月份)
majie_flag string ,--马甲标志
majie_account_cnt bigint ,--马甲账号数量
loyal_model bigint ,--用户忠诚度
shopping_type_model bigint ,--用户购物类型
figure_model bigint ,--身材
stature_model bigint ,--身高
dw_date timestamp
)
partitioned by
(dt string)
;
#***************************************************************
#文件名称: gdm_user_portrait_basic.sql
#
#****************************************************************
insert overwrite table gdm.gdm_user_portrait_basic partition(dt = '2015-01-01')
select
t.user_id bigint ,--用户ID
t.user_name string ,--用户登录名
t.user_sex string ,--性别
t.user_birthday string ,--生日
t.user_age bigint ,--年龄
t.constellation string ,--星座
t.big_area_name string ,--大区域
t.province string ,--省份
t.city tring ,--城市
t.city_level string ,--城市等级
t.hex_mail string ,--邮箱
t.op_mail string ,--邮箱运营商
t.hex_phone string ,
a51a
--加密手机
t.fore_phone string ,--手机前几位
t.op_phone string ,--手机运营商
t.add_time string ,--注册时间
t.login_ip string ,--登陆IP地址
t.login_source string ,--登录来源
t.request_user string ,--邀请人
t.total_mark bigint ,--会员积分
t.used_mark bigint ,--已使用积分
t.level_name string ,--会员等级名称
t.blacklist bigint ,--用户黑名单
t.is_married bigint ,--婚姻状况
t.education string ,--学历
t.monthly_income bigint ,--月收入
t.profession string ,--职业
null sex_model bigint ,--性别模型
null is_pregnant_woman bigint ,--是否孕妇
null is_have_children bigint ,-- 是否有小孩
null children_sex_rate double ,--孩子性别概率
null children_age_rate double ,--孩子年龄概率
null is_have_car bigint ,--是否有车
null potential_car_user_rate double ,--潜在汽车用户概率
null phone_brand string ,--使用手机品牌
null phone_brand_level string ,--使用手机品牌档次
null phone_cnt bigint ,--使用多少种不同的手机
null change_phone_rate bigint ,--更换手机频率(月份)
null majie_flag string ,--马甲标志
null majie_account_cnt bigint ,--马甲账号数量
null loyal_model bigint ,--用户忠诚度
null shopping_type_model bigint ,--用户购物类型
null figure_model bigint ,--身材
null stature_model bigint ,--身高
from_unixtime(unix_timestamp()) dw_date
from (select * from fdm.fdm_user_wide where dt ='2015-01-01') t
;
相关文章推荐
- 电商用户之用户画像5-3数据开发--客户消费订单表
- 电商用户之用户画像5-5数据开发--客户购买商店表
- 电商平台技术架构 多用户商城 仿天猫 淘宝 亚马逊 当当 阿里巴巴 大数据模块 低成本运维 高效开发
- 腾讯防刷负责人:基于用户画像大数据的电商防刷架构 - 本文出自BI168大数据社区,更多精彩请点击 原文地址:http://www.bi168.cn/>>http://www.bi168.cn/th
- 【技术支持】开发人员从客户数据库环境中导出数据用户测试的几种方法途径
- 腾讯防刷负责人:基于用户画像大数据的电商防刷架构
- 基于用户画像大数据的电商防刷架构
- 基于用户画像大数据的电商防刷架构
- 基于用户画像大数据的电商防刷架构
- 用户画像 数据开发的步骤
- 电商大数据应用之用户画像
- 电商大数据学习笔记:用户画像
- 基于用户画像大数据的电商防刷架构
- 基于用户画像大数据的电商防刷架构
- Asp.net 2.0 自定义控件开发专题讲解[为用户控件增加DataSource属性, 能够自动识别不同数据源](示例代码下载)
- 用户分群画像:抽样“猜想”让位于大数据“观察”
- 用户画像数据建模方法
- #########什么是用户画像?金融行业大数据用户画像实践#####好文章
- iOS开发UI篇—ios应用数据存储方式(XML属性列表-plist)
- 易观智库:大数据下的用户分析及用户画像(18页PPT附下载)