mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-12 12:37:55 +00:00
(improvement)(semantic) create model demo data through api instead of data-h2.sql
(improvement)(semantic) create benchmark demo data through api instead of data-h2.sql
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
package com.tencent.supersonic.semantic.api.model.enums;
|
||||
|
||||
public enum IdentifyTypeEnum {
|
||||
|
||||
primary,
|
||||
|
||||
foreign,
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.tencent.supersonic.semantic.api.model.enums;
|
||||
|
||||
public enum SemanticTypeEnum {
|
||||
|
||||
CATEGORY,
|
||||
ID,
|
||||
DATE,
|
||||
NUMBER
|
||||
|
||||
}
|
||||
@@ -25,6 +25,13 @@ public class Dim {
|
||||
|
||||
private String bizName;
|
||||
|
||||
public Dim(String name, String bizName, String type, Integer isCreateDimension) {
|
||||
this.name = name;
|
||||
this.type = type;
|
||||
this.isCreateDimension = isCreateDimension;
|
||||
this.bizName = bizName;
|
||||
}
|
||||
|
||||
public static Dim getDefault() {
|
||||
return new Dim("日期", "time", "2023-05-28",
|
||||
Constants.DAY_FORMAT,
|
||||
|
||||
@@ -10,8 +10,8 @@ import lombok.NoArgsConstructor;
|
||||
@NoArgsConstructor
|
||||
public class DimensionTimeTypeParams {
|
||||
|
||||
private String isPrimary;
|
||||
private String isPrimary = "true";
|
||||
|
||||
private String timeGranularity;
|
||||
private String timeGranularity = "day";
|
||||
|
||||
}
|
||||
|
||||
@@ -28,5 +28,10 @@ public class Measure {
|
||||
|
||||
private Long datasourceId;
|
||||
|
||||
|
||||
public Measure(String name, String bizName, String agg, Integer isCreateMetric) {
|
||||
this.name = name;
|
||||
this.agg = agg;
|
||||
this.isCreateMetric = isCreateMetric;
|
||||
this.bizName = bizName;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user