mirror of
https://github.com/tencentmusic/supersonic.git
synced 2026-04-29 04:14:20 +08:00
(improvement)(semantic) support metric relate dimension setting (#229)
Co-authored-by: jolunoluo
This commit is contained in:
@@ -8,6 +8,7 @@ import com.tencent.supersonic.auth.api.authorization.service.AuthService;
|
||||
import com.tencent.supersonic.common.pojo.enums.AggOperatorEnum;
|
||||
import com.tencent.supersonic.common.pojo.enums.AggregateTypeEnum;
|
||||
import com.tencent.supersonic.common.pojo.enums.SensitiveLevelEnum;
|
||||
import com.tencent.supersonic.semantic.api.model.enums.DataTypeEnum;
|
||||
import com.tencent.supersonic.semantic.api.model.enums.DimensionTypeEnum;
|
||||
import com.tencent.supersonic.semantic.api.model.enums.IdentifyTypeEnum;
|
||||
import com.tencent.supersonic.semantic.api.model.enums.SemanticTypeEnum;
|
||||
@@ -93,7 +94,7 @@ public class LoadModelDataDemo implements CommandLineRunner {
|
||||
DatabaseReq databaseReq = new DatabaseReq();
|
||||
databaseReq.setName("H2数据实例");
|
||||
databaseReq.setDescription("样例数据库实例");
|
||||
databaseReq.setType("h2");
|
||||
databaseReq.setType(DataTypeEnum.H2.getFeature());
|
||||
databaseReq.setUrl("jdbc:h2:mem:semantic;DATABASE_TO_UPPER=false");
|
||||
databaseReq.setUsername("root");
|
||||
databaseReq.setPassword("semantic");
|
||||
|
||||
@@ -129,6 +129,7 @@ CREATE TABLE IF NOT EXISTS `s2_model` (
|
||||
`viewer` varchar(3000) DEFAULT NULL , -- domain available users
|
||||
`view_org` varchar(3000) DEFAULT NULL , -- domain available organization
|
||||
`entity` varchar(500) DEFAULT NULL , -- domain entity info
|
||||
`drill_down_dimensions` varchar(500) DEFAULT NULL , -- drill down dimensions info
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
COMMENT ON TABLE s2_model IS 'model information';
|
||||
@@ -192,6 +193,7 @@ CREATE TABLE IF NOT EXISTS `s2_metric` (
|
||||
`data_format` varchar(500) DEFAULT NULL,
|
||||
`alias` varchar(500) DEFAULT NULL,
|
||||
`tags` varchar(500) DEFAULT NULL,
|
||||
`relate_dimensions` varchar(500) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
COMMENT ON TABLE s2_metric IS 'metric information table';
|
||||
|
||||
@@ -255,6 +255,7 @@ CREATE TABLE `s2_metric` (
|
||||
`data_format` varchar(500) DEFAULT NULL COMMENT '数值类型参数',
|
||||
`alias` varchar(500) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||
`tags` varchar(500) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||
`relate_dimensions` varchar(500) DEFAULT NULL COMMENT '指标相关维度',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='指标表';
|
||||
|
||||
@@ -275,6 +276,7 @@ CREATE TABLE `s2_model` (
|
||||
`updated_by` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||
`updated_at` datetime DEFAULT NULL,
|
||||
`entity` text COLLATE utf8_unicode_ci,
|
||||
`drill_down_dimensions` varchar(500) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
|
||||
|
||||
@@ -54,4 +54,8 @@ ALTER TABLE s2_model add alias varchar(200) default null after domain_id;
|
||||
alter table s2_metric add tags varchar(500) null;
|
||||
|
||||
--20230920
|
||||
alter table s2_user add is_admin int null;
|
||||
alter table s2_user add is_admin int null;
|
||||
|
||||
--20230926
|
||||
alter table s2_model add drill_down_dimensions varchar(500) null;
|
||||
alter table s2_metric add relate_dimensions varchar(500) null;
|
||||
@@ -144,6 +144,7 @@ CREATE TABLE IF NOT EXISTS `s2_model` (
|
||||
`viewer` varchar(3000) DEFAULT NULL , -- domain available users
|
||||
`view_org` varchar(3000) DEFAULT NULL , -- domain available organization
|
||||
`entity` varchar(500) DEFAULT NULL , -- domain entity info
|
||||
`drill_down_dimensions` varchar(500) DEFAULT NULL , -- drill down dimensions info
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
COMMENT ON TABLE s2_model IS 'model information';
|
||||
@@ -207,6 +208,7 @@ CREATE TABLE IF NOT EXISTS `s2_metric` (
|
||||
`data_format` varchar(500) DEFAULT NULL,
|
||||
`alias` varchar(500) DEFAULT NULL,
|
||||
`tags` varchar(500) DEFAULT NULL,
|
||||
`relate_dimensions` varchar(500) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
COMMENT ON TABLE s2_metric IS 'metric information table';
|
||||
|
||||
Reference in New Issue
Block a user