(improvement)(headless) Remove materialization logic (#586)

Co-authored-by: kanedai <kanedai@tencent.com>
This commit is contained in:
daikon
2023-12-29 23:10:54 +08:00
committed by GitHub
parent afa8fd74a6
commit 31f1fc315d
61 changed files with 0 additions and 7112 deletions

View File

@@ -63,12 +63,6 @@
<artifactId>headless-model</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.tencent.supersonic</groupId>
<artifactId>headless-materialization</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.tencent.supersonic</groupId>
<artifactId>auth-api</artifactId>

View File

@@ -449,70 +449,6 @@ CREATE TABLE IF NOT EXISTS `song` (
);
COMMENT ON TABLE song IS 'song';
-- benchmark
create table s2_materialization
(
id int AUTO_INCREMENT ,
name varchar(255) not null,
materialized_type varchar(255) not null ,
update_cycle varchar(255) ,
model_id bigint ,
database_id bigint not null ,
level int not null default 0 ,
status int not null default 1 ,
destination_table varchar(255) not null ,
date_info varchar(255) null ,
entities varchar(255) null ,
principals varchar(255) DEFAULT NULL ,
created_at TIMESTAMP null,
created_by varchar(100) null,
updated_at TIMESTAMP null,
updated_by varchar(100) not null,
description varchar(255) null,
primary key (id)
) ;
create table s2_materialization_element
(
id bigint not null ,
type varchar(255) not null ,
materialization_id bigint not null ,
depends varchar(255) DEFAULT NULL,
element_type varchar(255) DEFAULT NULL ,
default_value varchar(255) DEFAULT NULL ,
outlier varchar(255) DEFAULT NULL ,
frequency varchar(255) DEFAULT NULL ,
created_at TIMESTAMP null,
created_by varchar(100) null,
updated_at TIMESTAMP null,
updated_by varchar(100) not null,
description varchar(255) null ,
status int not null default 1 ,
PRIMARY KEY (id, type, materialization_id)
) ;
CREATE TABLE s2_materialization_record
(
`id` bigint NOT NULL AUTO_INCREMENT ,
`materialization_id` bigint NOT null ,
`element_type` varchar(255) not null ,
`element_id` bigint DEFAULT NULL ,
`element_name` varchar(255) not null ,
`data_time` varchar(64) DEFAULT NULL ,
`state` varchar(255) DEFAULT NULL ,
`task_id` varchar(255) DEFAULT NULL,
`created_at` TIMESTAMP null,
`updated_at` TIMESTAMP null,
`created_by` varchar(100) null,
`updated_by` varchar(100) not null,
`retry_count` bigint NOT NULL default 0,
`source_count` bigint NOT NULL default 0,
`sink_count` bigint NOT NULL default 0,
`message` varchar(255) ,
PRIMARY KEY (`id`)
);
CREATE TABLE s2_sys_parameter
(
id INT PRIMARY KEY AUTO_INCREMENT,

View File

@@ -426,69 +426,6 @@ create table s2_user
PRIMARY KEY (`id`)
);
CREATE TABLE `s2_materialization`
(
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL COMMENT '物化名称',
`materialized_type` varchar(255) NOT NULL COMMENT '物化类型 partition 分区 zipper 拉链 ',
`update_cycle` varchar(255) DEFAULT NULL COMMENT '更新周期,天更新、周更新、月更新',
`model_id` bigint(20) DEFAULT NULL,
`database_id` bigint(20) NOT NULL COMMENT '数据库实例ID',
`level` int(11) NOT NULL DEFAULT '0' COMMENT '优先级,数值越大优先级越高',
`status` int(11) NOT NULL DEFAULT '1' COMMENT '0-废弃1-使用中',
`destination_table` varchar(255) NOT NULL COMMENT '物化表名称',
`date_info` mediumtext COMMENT '时间字段',
`entities` mediumtext COMMENT 'primary字段',
`principals` varchar(255) DEFAULT NULL COMMENT '责任人',
`created_at` datetime DEFAULT NULL,
`created_by` varchar(100) DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
`updated_by` varchar(100) NOT NULL,
`description` mediumtext COMMENT '备注说明',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
CREATE TABLE `s2_materialization_element`
(
`id` bigint(20) NOT NULL COMMENT 'element类型对应id',
`type` varchar(255) NOT NULL COMMENT 'element类型 metric、dimension',
`materialization_id` bigint(20) NOT NULL COMMENT '关联s2_materialization主键',
`depends` text COMMENT '上游依赖标识',
`element_type` varchar(255) DEFAULT NULL COMMENT 'varchar,double,bigint,int,array',
`default_value` varchar(255) DEFAULT NULL COMMENT '默认值',
`outlier` varchar(255) DEFAULT NULL COMMENT '异常值',
`frequency` varchar(255) DEFAULT NULL COMMENT '变化频率, UNKNOWN, HIGH, LOW',
`created_at` datetime DEFAULT NULL,
`created_by` varchar(100) DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
`updated_by` varchar(100) NOT NULL,
`description` mediumtext COMMENT '备注说明',
`status` int(11) NOT NULL DEFAULT '1' COMMENT '0-废弃1-使用中',
PRIMARY KEY (`id`, `type`, `materialization_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `s2_materialization_record`
(
`id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`materialization_id` bigint(20) NOT NULL COMMENT '物化配置ID',
`element_type` varchar(255) NOT NULL COMMENT 'element类型 metric、dimension',
`element_id` bigint(20) DEFAULT NULL COMMENT '数据名字: 例如标签名、指标名',
`element_name` varchar(255) NOT NULL COMMENT 'element 名称',
`data_time` varchar(64) DEFAULT NULL COMMENT '数据时间',
`state` varchar(255) DEFAULT NULL COMMENT '任务运行状态',
`task_id` varchar(255) DEFAULT NULL COMMENT '任务id',
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
`created_by` varchar(100) DEFAULT NULL,
`updated_by` varchar(100) NOT NULL,
`retry_count` bigint(20) NOT NULL DEFAULT '0',
`source_count` bigint(20) NOT NULL DEFAULT '0',
`sink_count` bigint(20) NOT NULL DEFAULT '0',
`message` text COMMENT '信息',
PRIMARY KEY (`id`),
UNIQUE KEY `uq_id` (`materialization_id`,`element_type`,`element_id`,`data_time`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
CREATE TABLE s2_sys_parameter
(
id int primary key AUTO_INCREMENT COMMENT '主键id',

View File

@@ -466,67 +466,6 @@ COMMENT ON TABLE song IS 'song';
-- benchmark
create table s2_materialization
(
id int AUTO_INCREMENT ,
name varchar(255) not null,
materialized_type varchar(255) not null ,
update_cycle varchar(255) ,
model_id bigint ,
database_id bigint not null ,
level int not null default 0 ,
status int not null default 1 ,
destination_table varchar(255) not null ,
date_info varchar(255) null ,
entities varchar(255) null ,
principals varchar(255) DEFAULT NULL ,
created_at TIMESTAMP null,
created_by varchar(100) null,
updated_at TIMESTAMP null,
updated_by varchar(100) not null,
description varchar(255) null,
primary key (id)
) ;
create table s2_materialization_element
(
id bigint not null ,
type varchar(255) not null ,
materialization_id bigint not null ,
depends varchar(255) DEFAULT NULL,
element_type varchar(255) DEFAULT NULL ,
default_value varchar(255) DEFAULT NULL ,
outlier varchar(255) DEFAULT NULL ,
frequency varchar(255) DEFAULT NULL ,
created_at TIMESTAMP null,
created_by varchar(100) null,
updated_at TIMESTAMP null,
updated_by varchar(100) not null,
description varchar(255) null ,
status int not null default 1 ,
PRIMARY KEY (id, type, materialization_id)
) ;
CREATE TABLE s2_materialization_record
(
`id` bigint NOT NULL AUTO_INCREMENT ,
`materialization_id` bigint NOT null ,
`element_type` varchar(255) not null ,
`element_id` bigint DEFAULT NULL ,
`element_name` varchar(255) not null ,
`data_time` varchar(64) DEFAULT NULL ,
`state` varchar(255) DEFAULT NULL ,
`task_id` varchar(255) DEFAULT NULL,
`created_at` TIMESTAMP null,
`updated_at` TIMESTAMP null,
`created_by` varchar(100) null,
`updated_by` varchar(100) not null,
`retry_count` bigint NOT NULL default 0,
`source_count` bigint NOT NULL default 0,
`sink_count` bigint NOT NULL default 0,
`message` varchar(255) ,
PRIMARY KEY (`id`)
);
CREATE TABLE s2_sys_parameter
(