当前位置:   article > 正文

大数据竞赛数据抽取部分_大数据金砖赛的songs数据怎么获取

大数据金砖赛的songs数据怎么获取

MySQL数据准备

mysql -uroot -proot

create database shtd_store;

use shtd_store;

source ~/ds_pub.sql和gy_pub.sql文件,先上传至服务器家目录下。

链接:https://pan.baidu.com/s/1FmbqH86kG1cpQ8K6n7TJoQ?pwd=egeu 
提取码:egeu 
--来自百度网盘超级会员V5的分享

Hive数据准备

  1. create database ods;
  2. use ods;
  3. create table if not exists ods.user_info(
  4. id bigint,
  5. login_name string,
  6. nick_name string,
  7. password string,
  8. name string,
  9. phone_num string,
  10. email string,
  11. head_img string,
  12. user_level string,
  13. birthday date,
  14. gender string,
  15. create_time timestamp,
  16. operate_time timestamp)
  17. partitioned by(etldate string) row format delimited fields terminated by '\001' stored as textfile;
  18. insert into table ods.user_info partition (etldate="19971201") values(6814,"89xtog","周杰伦","","卖片",17777124243,"89xtong@163.net","",1,"1965-04-26","M","2020-04-26 18:55:55","2020-04-26 5:53:55");
  19. CREATE TABLE `ods.sku_info` (
  20. `id` bigint,
  21. `spu_id` bigint,
  22. `price` decimal(10, 0),
  23. `sku_name` string,
  24. `sku_desc` string,
  25. `weight` decimal(10, 2),
  26. `tm_id` bigint,
  27. `category3_id` bigint,
  28. `sku_default_img` string,
  29. `create_time` timestamp
  30. )partitioned by(etldate string)
  31. row format delimited fields terminated by '\001' stored as textfile;
  32. insert into ods.sku_info partition(etldate="19971201") values(1,1,2220,"测试","new ssku_desc",0.24,2,61,"http://www.baidu.com","1997-12-01 12:21:13");
  33. CREATE TABLE `ods.base_province` (
  34. `id` bigint,
  35. `name` string,
  36. `region_id` string,
  37. `area_code` string,
  38. `iso_code` string
  39. )partitioned by(etldate string) row format delimited fields terminated by '\001' stored as textfile;
  40. insert into table ods.base_province partition (etldate="19971201") values(0,"测试",1,110000,"CN-11");
  41. alter table ods.base_province add columns ('create_time' timestamp);
  42. CREATE TABLE `ods.base_region` (
  43. `id` string,
  44. `region_name` string
  45. )partitioned by(etldate string) row format delimited fields terminated by '\001' stored as textfile;
  46. insert into table ods.base_region partition (etldate="19971201") values (0,"测试");
  47. alter table ods.base region add columns ('create time' timestamp);
  48. CREATE TABLE `ods.order_detail` (
  49. `id` bigint,
  50. `order_id` bigint,
  51. `sku_id` bigint,
  52. `sku_name` string,
  53. `img_url` string,
  54. `order_price` decimal(10, 2),
  55. `sku_num` string,
  56. `create_time` timestamp,
  57. `source_type` string,
  58. `source_id` bigint
  59. ) partitioned by(etldate string) row format delimited fields terminated by '\001' stored as textfile;
  60. insert into table ods.order_detail partition(etldate="19971201") values(8621,3443,4,"测试","http://www.baidu.com",1442.00,1,"1997-12-01 18:47:14",2401,"");
  61. CREATE TABLE `ods.order_info` (
  62. `id` bigint,
  63. `consignee` string,
  64. `consignee_tel` string,
  65. `final_total_amount` decimal(16, 2),
  66. `order_status` string,
  67. `user_id` bigint,
  68. `delivery_address` string,
  69. `order_comment` string,
  70. `out_trade_no` string,
  71. `trade_body` string,
  72. `create_time` timestamp,
  73. `operate_time` timestamp,
  74. `expire_time` timestamp,
  75. `tracking_no` string,
  76. `parent_order_id` bigint,
  77. `img_url` string,
  78. `province_id` int,
  79. `benefit_reduce_amount` decimal(16, 2),
  80. `original_total_amount` decimal(16, 2),
  81. `feight_fee` decimal(16, 2)
  82. ) partitioned by(etldate string) row format delimited fields terminated by '\001' stored as textfile;
  83. insert into table ods.order_info partition(etldate="19971201") va
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/运维做开发/article/detail/854010
推荐阅读
相关标签
  

闽ICP备14008679号