您的位置:首页 > 游戏 > 游戏 > 给我一个可以在线观看的免费_flash中国官网_seo网站营销推广_正规电商平台有哪些

给我一个可以在线观看的免费_flash中国官网_seo网站营销推广_正规电商平台有哪些

2024/9/22 19:24:26 来源:https://blog.csdn.net/qq_45115959/article/details/142366065  浏览:    关键词:给我一个可以在线观看的免费_flash中国官网_seo网站营销推广_正规电商平台有哪些
给我一个可以在线观看的免费_flash中国官网_seo网站营销推广_正规电商平台有哪些

目录

 测试用表

 订单表 (2000万条数据)

 支付表 (600万条数据)

 商品信息表 (100万条数据)

 省份信息表 (34条数据)


 测试用表

 订单表 (2000万条数据)

1)表结构

id (订单id)user_id (用户id)product_id (商品id)province_id (省份id)create_time (下单时间)product_num (商品件数)total_amount (订单金额)
100000011254423541500319912020-06-14 03:54:293100.58
100000021927584051721036712020-06-14 01:19:478677.18

2)建表语句

hive (default)> 
drop table if exists order_detail;create table order_detail(id           string comment '订单id',user_id      string comment '用户id',product_id   string comment '商品id',province_id  string comment '省份id',create_time  string comment '下单时间',product_num  int comment '商品件数',total_amount decimal(16, 2) comment '下单金额')partitioned by (dt string)row format delimited fields terminated by '\t';

3)数据装载

order_detail.txt 文件上传到 hadoop12 节点的 /opt/module/hive/datas/ 目录,并执行以下导入语句。(数据可根据表结构自行模拟数据)

注:文件较大,请耐心等待。

hive (default)> load data local inpath '/opt/module/hive/datas/order_detail.txt' overwrite into table order_detail partition(dt='2020-06-14');
 支付表 (600万条数据)

1)表结构

id (支付id)order_detail_id (订单id)user_id (用户id)payment_time (支付时间)total_amount (订单金额)
10000001174030421315087582020-06-14 13:55:44391.72
10000002191988841330180752020-06-14 08:46:23657.10

2)建表语句

hive (default)> 
drop table if exists payment_detail;create table payment_detail(id              string comment '支付id',order_detail_id string comment '订单明细id',user_id         string comment '用户id',payment_time    string comment '支付时间',total_amount    decimal(16, 2) comment '支付金额')partitioned by (dt string)row format delimited fields terminated by '\t';

3)数据装载

payment_detail.txt 文件上传到 hadoop12 节点的 /opt/module/hive/datas/ 目录,并执行以下导入语句。(数据可根据表结构自行模拟数据)

注:文件较大,请耐心等待。

hive (default)> load data local inpath '/opt/module/hive/datas/payment_detail.txt' overwrite into table payment_detail partition(dt='2020-06-14');
 商品信息表 (100万条数据)

1)表结构

id (商品id)product_name (商品名称)price (价格)category_id (分类id)
1000001CuisW4517.00219
1000002TBtbp9357.00208

2)建表语句

hive (default)> 
drop table if exists product_info;create table product_info(id           string comment '商品id',product_name string comment '商品名称',price        decimal(16, 2) comment '价格',category_id  string comment '分类id')row format delimited fields terminated by '\t';

3)数据装载

product_info.txt 文件上传到 hadoop12 节点的 /opt/module/hive/datas/ 目录,并执行以下导入语句。(数据可根据表结构自行模拟数据)

hive (default)> load data local inpath '/opt/module/hive/datas/product_info.txt' overwrite into table product_info;
 省份信息表 (34条数据)

1)表结构

id (省份id)province_name (省份名称)
1北京
2天津

2)建表语句

hive (default)> 
drop table if exists province_info;create table province_info(id            string comment '省份id',province_name string comment '省份名称')row format delimited fields terminated by '\t';

3)数据装载

province_info.txt 文件上传到 hadoop12 节点的 /opt/module/hive/datas/ 目录,并执行以下导入语句。(数据可根据表结构自行模拟数据)

hive (default)> load data local inpath '/opt/module/hive/datas/province_info.txt' overwrite into table province_info;

注:需要下载源数据的,评论区私俺 

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com