/*
Navicat MySQL Data Transfer
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `dim_ds_biz_map`
-- ----------------------------
DROP TABLE IF EXISTS `dim_ds_biz_map`;
CREATE TABLE `dim_ds_biz_map` (
`id` int(11) NOT NULL AUTO_INCREMENT ,
`ds_id` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`biz_ds_name` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
PRIMARY KEY (`id`),
INDEX `idx_01` USING BTREE (`ds_id`(255))
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
;
-- ----------------------------
-- Table structure for `dim_project`
-- ----------------------------
DROP TABLE IF EXISTS `dim_project`;
CREATE TABLE `dim_project` (
`project_id` bigint(20) NOT NULL ,
`project_name` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`project_identifier` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`engine_odps_endpoint` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`engine_odps_project` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`engine_odps_meta_id` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
PRIMARY KEY (`project_id`),
INDEX `idx_01` USING BTREE (`engine_odps_meta_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
;
-- ----------------------------
-- Table structure for `dim_project_biz_map`
-- ----------------------------
DROP TABLE IF EXISTS `dim_project_biz_map`;
CREATE TABLE `dim_project_biz_map` (
`id` bigint(20) NOT NULL AUTO_INCREMENT ,
`app_id` bigint(20) NOT NULL ,
`dh_level` int(11) NOT NULL ,
PRIMARY KEY (`id`),
INDEX `idx_01` USING BTREE (`app_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
;
-- ----------------------------
-- Table structure for `dim_project_group_map`
-- ----------------------------
DROP TABLE IF EXISTS `dim_project_group_map`;
CREATE TABLE `dim_project_group_map` (
`id` bigint(20) NOT NULL AUTO_INCREMENT ,
`group_id` bigint(20) NOT NULL ,
`group_name` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`app_id` bigint(20) NOT NULL ,
PRIMARY KEY (`id`),
INDEX `idx_01` USING BTREE (`group_id`, `app_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
;
-- ----------------------------
-- Table structure for `rass_sys_lock`
-- ----------------------------
DROP TABLE IF EXISTS `rass_sys_lock`;
CREATE TABLE `rass_sys_lock` (
`lock_key` varchar(31) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`lock_status` int(11) NOT NULL DEFAULT 0 ,
`locked_on` datetime NOT NULL ,
`locked_by` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`locked_params` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL ,
PRIMARY KEY (`lock_key`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
;
-- ----------------------------
-- Records of rass_sys_lock
-- ----------------------------
BEGIN;
INSERT INTO `rass_sys_lock` VALUES ('etl.deploy.lock', '-1', '2015-12-28 23:49:20', null, null);
COMMIT;
-- ----------------------------
-- Table structure for `raw_dt_boost`
-- ----------------------------
DROP TABLE IF EXISTS `raw_dt_boost`;
CREATE TABLE `raw_dt_boost` (
`id` bigint(20) NOT NULL AUTO_INCREMENT ,
`record_on` date NOT NULL COMMENT '记录时间' ,
`project_id` bigint(20) NOT NULL COMMENT 'DTBoost里的应用ID' ,
`project_name` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'DTBoost里的应用名称' ,
`counts` bigint(20) NOT NULL COMMENT ' 调用次数' ,
PRIMARY KEY (`id`),
INDEX `idx_01` USING BTREE (`record_on`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
;
-- ----------------------------
-- Table structure for `raw_project`
-- ----------------------------
DROP TABLE IF EXISTS `raw_project`;
CREATE TABLE `raw_project` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键' ,
`record_on` date NOT NULL ,
`app_id` bigint(20) NOT NULL ,
`project_from` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`project_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`project_type` int(11) NOT NULL ,
`first_start_time` datetime NULL DEFAULT NULL ,
`last_finish_time` datetime NULL DEFAULT NULL ,
`duration` bigint(20) NOT NULL DEFAULT 0 ,
`total_duration` bigint(20) NOT NULL DEFAULT 0 ,
`storage` bigint(20) NOT NULL DEFAULT 0 ,
`cost_cpu` int(11) NOT NULL DEFAULT 0 ,
`total_tables` int(11) NOT NULL DEFAULT 0 ,
`empty_tables` int(11) NOT NULL DEFAULT 0 ,
`total_tasks` int(11) NOT NULL DEFAULT 0 ,
`success_tasks` int(11) NOT NULL DEFAULT 0 ,
`suspend_tasks` int(11) NOT NULL DEFAULT 0 ,
`input_bytes` bigint(20) NOT NULL DEFAULT 0 ,
`output_bytes` bigint(20) NOT NULL DEFAULT 0 ,
PRIMARY KEY (`id`),
INDEX `idx_01` USING BTREE (`record_on`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
;
-- ----------------------------
-- Table structure for `raw_table`
-- ----------------------------
DROP TABLE IF EXISTS `raw_table`;
CREATE TABLE `raw_table` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键' ,
`record_on` date NOT NULL ,
`app_id` bigint(20) NOT NULL ,
`project_from` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '哪个元仓来的,元仓的标识' ,
`project_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`project_type` int(11) NOT NULL ,
`table_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`records` bigint(20) NOT NULL DEFAULT 0 ,
`storage` bigint(20) NOT NULL DEFAULT 0 ,
PRIMARY KEY (`id`),
INDEX `idx_01` USING BTREE (`record_on`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
;
-- ----------------------------
-- Table structure for `raw_task`
-- ----------------------------
DROP TABLE IF EXISTS `raw_task`;
CREATE TABLE `raw_task` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键' ,
`biz_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '调度下发的biz_id' ,
`record_on` date NOT NULL COMMENT '记录生成时间' ,
`task_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '调度的task_id' ,
`task_name` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`node_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '调度的node_id' ,
`flow_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '调度的flow_id' ,
`app_id` bigint(20) NOT NULL DEFAULT 0 COMMENT 'base的project_id' ,
`prg_type` int(11) NOT NULL ,
`task_type` int(11) NOT NULL ,
`trigger_on` datetime NULL DEFAULT NULL ,
`start_on` datetime NULL DEFAULT NULL ,
`finish_on` datetime NULL DEFAULT NULL ,
`duration` bigint(20) NOT NULL DEFAULT 0 ,
`status` int(11) NOT NULL ,
`cost_cpu` int(11) NOT NULL DEFAULT 0 ,
`input_bytes` bigint(20) NOT NULL DEFAULT 0 ,
`output_bytes` bigint(20) NOT NULL DEFAULT 0 ,
`input_tables` int(11) NOT NULL DEFAULT 0 ,
`output_tables` int(11) NOT NULL DEFAULT 0 ,
`temp_tables` int(11) NOT NULL DEFAULT 0 ,
PRIMARY KEY (`id`),
INDEX `idx_01` USING BTREE (`record_on`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
;
-- ----------------------------
-- Table structure for `raw_trans_ads`
-- ----------------------------
DROP TABLE IF EXISTS `raw_trans_ads`;
CREATE TABLE `raw_trans_ads` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键' ,
`record_on` date NOT NULL ,
`from_ds_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`from_table_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`to_ds_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`to_table_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
PRIMARY KEY (`id`),
INDEX `idx_01` USING BTREE (`record_on`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
;
-- ----------------------------
-- Table structure for `raw_trans_biz`
-- ----------------------------
DROP TABLE IF EXISTS `raw_trans_biz`;
CREATE TABLE `raw_trans_biz` (
`id` bigint(20) NOT NULL AUTO_INCREMENT ,
`record_on` date NOT NULL ,
`from_ds_id` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`from_ds_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`to_ds_id` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`to_ds_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`start_on` datetime NULL DEFAULT NULL ,
`finish_on` datetime NULL DEFAULT NULL ,
`duration` bigint(20) NOT NULL COMMENT '0' ,
`total_tasks` int(11) NOT NULL DEFAULT 0 ,
`total_tables` int(11) NOT NULL DEFAULT 0 ,
`transfer_bytes` bigint(20) NOT NULL DEFAULT 0 ,
`transfer_records` bigint(20) NOT NULL DEFAULT 0 ,
PRIMARY KEY (`id`),
INDEX `idx_01` USING BTREE (`record_on`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
;
-- ----------------------------
-- Table structure for `rpt_dh_stats`
-- ----------------------------
DROP TABLE IF EXISTS `rpt_dh_stats`;
CREATE TABLE `rpt_dh_stats` (
`id` bigint(20) NOT NULL AUTO_INCREMENT ,
`record_on` date NOT NULL ,
`dh_level` int(11) NOT NULL ,
`total_projects` int(11) NOT NULL ,
`total_tables` int(11) NOT NULL ,
`total_storage` bigint(20) NOT NULL ,
PRIMARY KEY (`id`),
INDEX `idx_01` USING BTREE (`record_on`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
;
-- ----------------------------
-- Table structure for `rpt_trans_ads_stats`
-- ----------------------------
DROP TABLE IF EXISTS `rpt_trans_ads_stats`;
CREATE TABLE `rpt_trans_ads_stats` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键' ,
`record_on` date NOT NULL ,
`to_ds_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`to_table_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`transfer_bytes` bigint(20) NOT NULL DEFAULT 0 ,
`transfer_records` bigint(20) NOT NULL DEFAULT 0 ,
`processed` tinyint(4) NOT NULL DEFAULT 0 ,
PRIMARY KEY (`id`),
INDEX `idx_01` USING BTREE (`record_on`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
;
-- ----------------------------
-- Table structure for `rpt_trans_biz_bus`
-- ----------------------------
DROP TABLE IF EXISTS `rpt_trans_biz_bus`;
CREATE TABLE `rpt_trans_biz_bus` (
`id` bigint(20) NOT NULL AUTO_INCREMENT ,
`record_on` date NOT NULL ,
`biz_ds_name` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`trans_type` tinyint(4) NOT NULL ,
`duration` bigint(11) NOT NULL DEFAULT 0 ,
`total_tasks` int(11) NOT NULL DEFAULT 0 ,
`total_tables` int(11) NOT NULL DEFAULT 0 ,
`transfer_bytes` bigint(20) NOT NULL DEFAULT 0 ,
`transfer_records` bigint(20) NOT NULL DEFAULT 0 ,
PRIMARY KEY (`id`),
INDEX `idx_01` USING BTREE (`record_on`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
;
-- ----------------------------
-- Table structure for `rpt_trans_biz_type`
-- ----------------------------
DROP TABLE IF EXISTS `rpt_trans_biz_type`;
CREATE TABLE `rpt_trans_biz_type` (
`id` bigint(20) NOT NULL AUTO_INCREMENT ,
`record_on` date NOT NULL ,
`from_ds_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`to_ds_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`duration` bigint(20) NOT NULL DEFAULT 0 ,
`total_tasks` int(11) NOT NULL DEFAULT 0 ,
`total_tables` int(11) NOT NULL DEFAULT 0 ,
`transfer_bytes` bigint(20) NOT NULL DEFAULT 0 ,
`transfer_records` bigint(20) NOT NULL DEFAULT 0 ,
PRIMARY KEY (`id`),
INDEX `idx_01` USING BTREE (`record_on`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
;