电商核心业务知识
订单商品模块(9张表)
--订单主要信息表
drop table if exists itqsc.ods_b2c_orders;
create external table itqsc.ods_b2c_orders
(
order_id bigint, -订单ID(主键)
order_no string, -订单号
order_date timestamp, -订单日期
user_id bigint, -用户ID
user_name string, -登陆名
order_money double, -订单金额
order_type string, -订单类型
order_status string, -订单状态
pay_type string, -支付类型
pay_status string, -支付状态
order_source string, -订单来源
last_update_time timestamp, -订单最后修改时间
dw_date timestamp
)
partitioned by
(dt string)
LOCATION 'hdfs://hadoop0:9000/user/hadoop/dev/itqsc/ods_b2c_orders';
--订单商品信息表
drop table if exists itqsc.ods_b2c_orders_goods;
create external table itqsc.ods_b2c_orders_goods
(
order_id bigint, -订单ID
goods_id bignit, -商品ID
cat_id bigint, -类目ID
size_id bigint, -条码ID(联合主键)
cat_name string, -类目名称
goods_price double, -商品价格
goods_amout bigint, -数量
last_update_time timestamp, -最后修改时间
dw_date timestamp
)
partitioned by
(dt string)
LOCATION 'hdfs://hadoop0:9000/user/hadoop/dev/itqsc/ods_b2c_orders_goods';
--订单详细信息表
drop table if exists itqsc.ods_b2c_orders_desc;
create external table itqsc.ods_b2c_orders_desc
(
order_id bigint, -订单ID(主键)
orde
订单商品模块(9张表)
--订单主要信息表
drop table if exists itqsc.ods_b2c_orders;
create external table itqsc.ods_b2c_orders
(
order_id bigint, -订单ID(主键)
order_no string, -订单号
order_date timestamp, -订单日期
user_id bigint, -用户ID
user_name string, -登陆名
order_money double, -订单金额
order_type string, -订单类型
order_status string, -订单状态
pay_type string, -支付类型
pay_status string, -支付状态
order_source string, -订单来源
last_update_time timestamp, -订单最后修改时间
dw_date timestamp
)
partitioned by
(dt string)
LOCATION 'hdfs://hadoop0:9000/user/hadoop/dev/itqsc/ods_b2c_orders';
--订单商品信息表
drop table if exists itqsc.ods_b2c_orders_goods;
create external table itqsc.ods_b2c_orders_goods
(
order_id bigint, -订单ID
goods_id bignit, -商品ID
cat_id bigint, -类目ID
size_id bigint, -条码ID(联合主键)
cat_name string, -类目名称
goods_price double, -商品价格
goods_amout bigint, -数量
last_update_time timestamp, -最后修改时间
dw_date timestamp
)
partitioned by
(dt string)
LOCATION 'hdfs://hadoop0:9000/user/hadoop/dev/itqsc/ods_b2c_orders_goods';
--订单详细信息表
drop table if exists itqsc.ods_b2c_orders_desc;
create external table itqsc.ods_b2c_orders_desc
(
order_id bigint, -订单ID(主键)
orde