(improvement)(Headless) Modify metric category name, add information about whether metrics and dimensions are tags in fetchDataSetSchema (#857)

This commit is contained in:
lexluo09
2024-03-25 15:37:11 +08:00
committed by GitHub
parent aa5f3c9a83
commit f6aefe2fb0
17 changed files with 127 additions and 86 deletions

View File

@@ -411,7 +411,7 @@ public class ModelDemoDataLoader {
metricReq.setBizName("stay_hours");
metricReq.setSensitiveLevel(SensitiveLevelEnum.HIGH.getCode());
metricReq.setDescription("停留时长");
metricReq.setTags(Collections.singletonList("核心指标"));
metricReq.setClassifications(Collections.singletonList("核心指标"));
metricReq.setAlias("访问时长");
MetricDefineByMeasureParams metricTypeParams = new MetricDefineByMeasureParams();
metricTypeParams.setExpr("s2_stay_time_statis_stay_hours");
@@ -476,7 +476,7 @@ public class ModelDemoDataLoader {
metricReq.setBizName("pv_avg");
metricReq.setSensitiveLevel(SensitiveLevelEnum.HIGH.getCode());
metricReq.setDescription("每个用户平均访问的次数");
metricReq.setTags(Collections.singletonList("核心指标"));
metricReq.setClassifications(Collections.singletonList("核心指标"));
metricReq.setAlias("平均访问次数");
MetricDefineByMetricParams metricTypeParams = new MetricDefineByMetricParams();
metricTypeParams.setExpr("pv/uv");

View File

@@ -285,4 +285,7 @@ CREATE TABLE IF NOT EXISTS `s2_query_rule` (
`ext` LONGVARCHAR DEFAULT NULL ,
PRIMARY KEY (`id`)
);
COMMENT ON TABLE s2_query_rule IS 'tag query rule table';
COMMENT ON TABLE s2_query_rule IS 'tag query rule table';
--20240325
ALTER TABLE s2_metric RENAME COLUMN tags TO classifications;

View File

@@ -186,7 +186,7 @@ CREATE TABLE IF NOT EXISTS `s2_metric` (
`data_format_type` varchar(50) DEFAULT NULL ,
`data_format` varchar(500) DEFAULT NULL,
`alias` varchar(500) DEFAULT NULL,
`tags` varchar(500) DEFAULT NULL,
`classifications` varchar(500) DEFAULT NULL,
`relate_dimensions` varchar(500) DEFAULT NULL,
`ext` LONGVARCHAR DEFAULT NULL ,
`define_type` varchar(50) NOT NULL, -- MEASURE, FIELD, METRIC

View File

@@ -291,7 +291,7 @@ CREATE TABLE `s2_metric`
`data_format_type` varchar(50) DEFAULT NULL COMMENT '数值类型',
`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,
`classifications` varchar(500) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
`relate_dimensions` varchar(500) DEFAULT NULL COMMENT '指标相关维度',
`ext` text DEFAULT NULL,
`define_type` varchar(50) DEFAULT NULL, -- MEASURE, FIELD, METRIC

View File

@@ -186,7 +186,7 @@ CREATE TABLE IF NOT EXISTS `s2_metric` (
`data_format_type` varchar(50) DEFAULT NULL ,
`data_format` varchar(500) DEFAULT NULL,
`alias` varchar(500) DEFAULT NULL,
`tags` varchar(500) DEFAULT NULL,
`classifications` varchar(500) DEFAULT NULL,
`relate_dimensions` varchar(500) DEFAULT NULL,
`ext` LONGVARCHAR DEFAULT NULL ,
`define_type` varchar(50) NOT NULL, -- MEASURE, FIELD, METRIC