赞
踩
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的分享
- create database ods;
- use ods;
-
- create table if not exists ods.user_info(
- id bigint,
- login_name string,
- nick_name string,
- password string,
- name string,
- phone_num string,
- email string,
- head_img string,
- user_level string,
- birthday date,
- gender string,
- create_time timestamp,
- operate_time timestamp)
- partitioned by(etldate string) row format delimited fields terminated by '\001' stored as textfile;
-
- 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");
-
-
-
- CREATE TABLE `ods.sku_info` (
- `id` bigint,
- `spu_id` bigint,
- `price` decimal(10, 0),
- `sku_name` string,
- `sku_desc` string,
- `weight` decimal(10, 2),
- `tm_id` bigint,
- `category3_id` bigint,
- `sku_default_img` string,
- `create_time` timestamp
- )partitioned by(etldate string)
- row format delimited fields terminated by '\001' stored as textfile;
-
- 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");
-
-
-
- CREATE TABLE `ods.base_province` (
- `id` bigint,
- `name` string,
- `region_id` string,
- `area_code` string,
- `iso_code` string
- )partitioned by(etldate string) row format delimited fields terminated by '\001' stored as textfile;
-
- insert into table ods.base_province partition (etldate="19971201") values(0,"测试",1,110000,"CN-11");
- alter table ods.base_province add columns ('create_time' timestamp);
-
-
-
-
-
- CREATE TABLE `ods.base_region` (
- `id` string,
- `region_name` string
- )partitioned by(etldate string) row format delimited fields terminated by '\001' stored as textfile;
-
-
- insert into table ods.base_region partition (etldate="19971201") values (0,"测试");
- alter table ods.base region add columns ('create time' timestamp);
-
-
-
-
-
- CREATE TABLE `ods.order_detail` (
- `id` bigint,
- `order_id` bigint,
- `sku_id` bigint,
- `sku_name` string,
- `img_url` string,
- `order_price` decimal(10, 2),
- `sku_num` string,
- `create_time` timestamp,
- `source_type` string,
- `source_id` bigint
- ) partitioned by(etldate string) row format delimited fields terminated by '\001' stored as textfile;
-
- 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,"");
-
-
-
-
- CREATE TABLE `ods.order_info` (
- `id` bigint,
- `consignee` string,
- `consignee_tel` string,
- `final_total_amount` decimal(16, 2),
- `order_status` string,
- `user_id` bigint,
- `delivery_address` string,
- `order_comment` string,
- `out_trade_no` string,
- `trade_body` string,
- `create_time` timestamp,
- `operate_time` timestamp,
- `expire_time` timestamp,
- `tracking_no` string,
- `parent_order_id` bigint,
- `img_url` string,
- `province_id` int,
- `benefit_reduce_amount` decimal(16, 2),
- `original_total_amount` decimal(16, 2),
- `feight_fee` decimal(16, 2)
- ) partitioned by(etldate string) row format delimited fields terminated by '\001' stored as textfile;
-
-
- insert into table ods.order_info partition(etldate="19971201") va
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。