Unverified Commit 28b7440c authored by ZackYoung's avatar ZackYoung Committed by GitHub

[Refactor][Web]Add catalog (#2386)

* optimize_version * optimize_version * add_structure * add_catalog * add_catalog * add_catalog * add_catalog * add_catalog * add_catalog * add_catalog
parent 3cbe7ed7
...@@ -27,7 +27,7 @@ import org.dinky.data.dto.StudioMetaStoreDTO; ...@@ -27,7 +27,7 @@ import org.dinky.data.dto.StudioMetaStoreDTO;
import org.dinky.data.enums.BusinessType; import org.dinky.data.enums.BusinessType;
import org.dinky.data.enums.Status; import org.dinky.data.enums.Status;
import org.dinky.data.model.Catalog; import org.dinky.data.model.Catalog;
import org.dinky.data.model.FlinkColumn; import org.dinky.data.model.Column;
import org.dinky.data.model.Schema; import org.dinky.data.model.Schema;
import org.dinky.data.result.IResult; import org.dinky.data.result.IResult;
import org.dinky.data.result.Result; import org.dinky.data.result.Result;
...@@ -176,7 +176,7 @@ public class StudioController { ...@@ -176,7 +176,7 @@ public class StudioController {
paramType = "query"), paramType = "query"),
@ApiImplicitParam(name = "table", value = "table", required = true, dataType = "String", paramType = "query") @ApiImplicitParam(name = "table", value = "table", required = true, dataType = "String", paramType = "query")
}) })
public Result<List<FlinkColumn>> getMSFlinkColumns( public Result<List<Column>> getMSFlinkColumns(
@RequestParam Integer envId, @RequestParam Integer envId,
@RequestParam String catalog, @RequestParam String catalog,
@RequestParam String database, @RequestParam String database,
......
...@@ -23,7 +23,7 @@ import org.dinky.data.dto.StudioCADTO; ...@@ -23,7 +23,7 @@ import org.dinky.data.dto.StudioCADTO;
import org.dinky.data.dto.StudioDDLDTO; import org.dinky.data.dto.StudioDDLDTO;
import org.dinky.data.dto.StudioMetaStoreDTO; import org.dinky.data.dto.StudioMetaStoreDTO;
import org.dinky.data.model.Catalog; import org.dinky.data.model.Catalog;
import org.dinky.data.model.FlinkColumn; import org.dinky.data.model.Column;
import org.dinky.data.model.Schema; import org.dinky.data.model.Schema;
import org.dinky.data.result.IResult; import org.dinky.data.result.IResult;
import org.dinky.data.result.SelectResult; import org.dinky.data.result.SelectResult;
...@@ -41,67 +41,19 @@ import com.fasterxml.jackson.databind.JsonNode; ...@@ -41,67 +41,19 @@ import com.fasterxml.jackson.databind.JsonNode;
*/ */
public interface StudioService { public interface StudioService {
/**
* Execute a DDL statement and return the result.
*
* @param studioDDLDTO A {@link StudioDDLDTO} object representing the DDL statement to execute.
* @return An {@link IResult} object representing the result of the DDL statement execution.
*/
IResult executeDDL(StudioDDLDTO studioDDLDTO); IResult executeDDL(StudioDDLDTO studioDDLDTO);
/**
* Get common SQL data based on the specified task ID.
*
* @param taskId The ID of the task to get the common SQL data for.
* @return A {@link JdbcSelectResult} object representing the common SQL data for the specified task ID.
*/
JdbcSelectResult getCommonSqlData(Integer taskId); JdbcSelectResult getCommonSqlData(Integer taskId);
/**
* Get job data based on the specified job ID.
*
* @param jobId The ID of the job to get the job data for.
* @return A {@link SelectResult} object representing the job data for the specified job ID.
*/
SelectResult getJobData(String jobId); SelectResult getJobData(String jobId);
/**
* Get the lineage information for a specified studio CAD.
*
* @param studioCADTO A {@link StudioCADTO} object representing the studio CAD to get the lineage information for.
* @return A {@link LineageResult} object representing the lineage information for the specified studio CAD.
*/
LineageResult getLineage(StudioCADTO studioCADTO); LineageResult getLineage(StudioCADTO studioCADTO);
/**
* Get a list of Flink jobs based on the specified cluster ID.
*
* @param clusterId The ID of the cluster to get the Flink jobs for.
* @return A list of {@link JsonNode} objects representing the Flink jobs for the specified cluster ID.
*/
List<JsonNode> listFlinkJobs(Integer clusterId); List<JsonNode> listFlinkJobs(Integer clusterId);
/**
* Get MS catalogs based on the specified studio meta store DTO.
*
* @param studioMetaStoreDTO A {@link StudioMetaStoreDTO} object representing the studio meta store DTO to get the MS catalogs for.
* @return A list of {@link Catalog} objects representing the MS catalogs for the specified studio meta store DTO.
*/
List<Catalog> getMSCatalogs(StudioMetaStoreDTO studioMetaStoreDTO); List<Catalog> getMSCatalogs(StudioMetaStoreDTO studioMetaStoreDTO);
/**
* Get the schema information for a specified MS catalog.
*
* @param studioMetaStoreDTO A {@link StudioMetaStoreDTO} object representing the MS catalog to get the schema information for.
* @return A {@link Schema} object representing the schema information for the specified MS catalog.
*/
Schema getMSSchemaInfo(StudioMetaStoreDTO studioMetaStoreDTO); Schema getMSSchemaInfo(StudioMetaStoreDTO studioMetaStoreDTO);
/** List<Column> getMSFlinkColumns(StudioMetaStoreDTO studioMetaStoreDTO);
* Get a list of Flink columns based on the specified MS catalog.
*
* @param studioMetaStoreDTO A {@link StudioMetaStoreDTO} object representing the MS catalog to get the Flink columns for.
* @return A list of {@link FlinkColumn} objects representing the Flink columns for the specified MS catalog.
*/
List<FlinkColumn> getMSFlinkColumns(StudioMetaStoreDTO studioMetaStoreDTO);
} }
...@@ -27,14 +27,15 @@ import org.dinky.data.dto.StudioDDLDTO; ...@@ -27,14 +27,15 @@ import org.dinky.data.dto.StudioDDLDTO;
import org.dinky.data.dto.StudioMetaStoreDTO; import org.dinky.data.dto.StudioMetaStoreDTO;
import org.dinky.data.model.Catalog; import org.dinky.data.model.Catalog;
import org.dinky.data.model.Cluster; import org.dinky.data.model.Cluster;
import org.dinky.data.model.Column;
import org.dinky.data.model.DataBase; import org.dinky.data.model.DataBase;
import org.dinky.data.model.FlinkColumn;
import org.dinky.data.model.Schema; import org.dinky.data.model.Schema;
import org.dinky.data.model.Table; import org.dinky.data.model.Table;
import org.dinky.data.result.DDLResult; import org.dinky.data.result.DDLResult;
import org.dinky.data.result.IResult; import org.dinky.data.result.IResult;
import org.dinky.data.result.ResultPool; import org.dinky.data.result.ResultPool;
import org.dinky.data.result.SelectResult; import org.dinky.data.result.SelectResult;
import org.dinky.executor.CustomTableEnvironment;
import org.dinky.explainer.lineage.LineageBuilder; import org.dinky.explainer.lineage.LineageBuilder;
import org.dinky.explainer.lineage.LineageResult; import org.dinky.explainer.lineage.LineageResult;
import org.dinky.job.JobConfig; import org.dinky.job.JobConfig;
...@@ -49,6 +50,7 @@ import org.dinky.service.DataBaseService; ...@@ -49,6 +50,7 @@ import org.dinky.service.DataBaseService;
import org.dinky.service.StudioService; import org.dinky.service.StudioService;
import org.dinky.service.TaskService; import org.dinky.service.TaskService;
import org.dinky.sql.FlinkQuery; import org.dinky.sql.FlinkQuery;
import org.dinky.utils.FlinkTableMetadataUtil;
import org.dinky.utils.RunTimeUtil; import org.dinky.utils.RunTimeUtil;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -60,10 +62,14 @@ import org.springframework.stereotype.Service; ...@@ -60,10 +62,14 @@ import org.springframework.stereotype.Service;
import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.JsonNode;
import cn.dev33.satoken.stp.StpUtil; import cn.dev33.satoken.stp.StpUtil;
import cn.hutool.cache.Cache;
import cn.hutool.cache.CacheUtil;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
/** StudioServiceImpl */ /**
* StudioServiceImpl
*/
@Service @Service
@RequiredArgsConstructor @RequiredArgsConstructor
@Slf4j @Slf4j
...@@ -72,6 +78,7 @@ public class StudioServiceImpl implements StudioService { ...@@ -72,6 +78,7 @@ public class StudioServiceImpl implements StudioService {
private final ClusterInstanceService clusterInstanceService; private final ClusterInstanceService clusterInstanceService;
private final DataBaseService dataBaseService; private final DataBaseService dataBaseService;
private final TaskService taskService; private final TaskService taskService;
private final Cache<String, JobManager> jobManagerCache = CacheUtil.newTimedCache(1000 * 60 * 2);
private IResult executeMSFlinkSql(StudioMetaStoreDTO studioMetaStoreDTO) { private IResult executeMSFlinkSql(StudioMetaStoreDTO studioMetaStoreDTO) {
String envSql = taskService.buildEnvSql(studioMetaStoreDTO); String envSql = taskService.buildEnvSql(studioMetaStoreDTO);
...@@ -153,116 +160,65 @@ public class StudioServiceImpl implements StudioService { ...@@ -153,116 +160,65 @@ public class StudioServiceImpl implements StudioService {
catalogs.add(defaultCatalog); catalogs.add(defaultCatalog);
} }
} else { } else {
studioMetaStoreDTO.setStatement(FlinkQuery.showCatalogs()); String envSql = taskService.buildEnvSql(studioMetaStoreDTO);
IResult result = executeMSFlinkSql(studioMetaStoreDTO); JobManager jobManager = getJobManager(studioMetaStoreDTO, envSql);
CustomTableEnvironment customTableEnvironment =
if (result instanceof DDLResult) { jobManager.getExecutor().getCustomTableEnvironment();
DDLResult ddlResult = (DDLResult) result; catalogs.addAll(FlinkTableMetadataUtil.getCatalog(customTableEnvironment));
ddlResult.getColumns().stream().findFirst().ifPresent(key -> {
for (Map<String, Object> item : ddlResult.getRowData()) {
catalogs.add(Catalog.build(item.get(key).toString()));
}
});
for (Catalog catalog : catalogs) {
String statement = FlinkQuery.useCatalog(catalog.getName())
+ FlinkQuery.separator()
+ FlinkQuery.showDatabases();
studioMetaStoreDTO.setStatement(statement);
IResult tableResult = executeMSFlinkSql(studioMetaStoreDTO);
DDLResult tableDDLResult = (DDLResult) tableResult;
tableDDLResult.getColumns().stream().findFirst().ifPresent(key -> {
List<Map<String, Object>> rowData = tableDDLResult.getRowData();
List<Schema> schemas = new ArrayList<>();
for (Map<String, Object> item : rowData) {
schemas.add(Schema.build(item.get(key).toString()));
}
catalog.setSchemas(schemas);
});
}
}
} }
return catalogs; return catalogs;
} }
@Override @Override
public Schema getMSSchemaInfo(StudioMetaStoreDTO studioMetaStoreDTO) { public Schema getMSSchemaInfo(StudioMetaStoreDTO studioMetaStoreDTO) {
Schema schema = Schema.build(studioMetaStoreDTO.getDatabase()); String database = studioMetaStoreDTO.getDatabase();
Schema schema = Schema.build(database);
List<Table> tables = new ArrayList<>(); List<Table> tables = new ArrayList<>();
if (Dialect.isCommonSql(studioMetaStoreDTO.getDialect())) { if (Dialect.isCommonSql(studioMetaStoreDTO.getDialect())) {
DataBase dataBase = dataBaseService.getById(studioMetaStoreDTO.getDatabaseId()); DataBase dataBase = dataBaseService.getById(studioMetaStoreDTO.getDatabaseId());
if (Asserts.isNotNull(dataBase)) { if (Asserts.isNotNull(dataBase)) {
Driver driver = Driver.build(dataBase.getDriverConfig()); Driver driver = Driver.build(dataBase.getDriverConfig());
tables.addAll(driver.listTables(studioMetaStoreDTO.getDatabase())); tables.addAll(driver.listTables(database));
} }
} else { } else {
String baseStatement = FlinkQuery.useCatalog(studioMetaStoreDTO.getCatalog()) String envSql = taskService.buildEnvSql(studioMetaStoreDTO);
+ FlinkQuery.separator() JobManager jobManager = getJobManager(studioMetaStoreDTO, envSql);
+ FlinkQuery.useDatabase(studioMetaStoreDTO.getDatabase()) CustomTableEnvironment customTableEnvironment =
+ FlinkQuery.separator(); jobManager.getExecutor().getCustomTableEnvironment();
FlinkTableMetadataUtil.setSchemaInfo(
// show tables customTableEnvironment, studioMetaStoreDTO.getCatalog(), database, schema, tables);
String tableStatement = baseStatement + FlinkQuery.showTables();
studioMetaStoreDTO.setStatement(tableStatement);
IResult result = executeMSFlinkSql(studioMetaStoreDTO);
if (result instanceof DDLResult) {
DDLResult ddlResult = (DDLResult) result;
ddlResult.getColumns().stream().findFirst().ifPresent(key -> {
List<Map<String, Object>> rowData = ddlResult.getRowData();
for (Map<String, Object> item : rowData) {
Table table = Table.build(item.get(key).toString(), studioMetaStoreDTO.getDatabase());
table.setCatalog(studioMetaStoreDTO.getCatalog());
tables.add(table);
}
});
}
// show views
schema.setViews(showInfo(studioMetaStoreDTO, baseStatement, FlinkQuery.showViews()));
// show functions
schema.setFunctions(showInfo(studioMetaStoreDTO, baseStatement, FlinkQuery.showFunctions()));
// show user functions
schema.setUserFunctions(showInfo(studioMetaStoreDTO, baseStatement, FlinkQuery.showUserFunctions()));
// show modules
schema.setModules(showInfo(studioMetaStoreDTO, baseStatement, FlinkQuery.showModules()));
} }
schema.setTables(tables); schema.setTables(tables);
return schema; return schema;
} }
@Override @Override
public List<FlinkColumn> getMSFlinkColumns(StudioMetaStoreDTO studioMetaStoreDTO) { public List<Column> getMSFlinkColumns(StudioMetaStoreDTO studioMetaStoreDTO) {
List<FlinkColumn> columns = new ArrayList<>(); List<Column> columns = new ArrayList<>();
if (!Dialect.isCommonSql(studioMetaStoreDTO.getDialect())) { if (!Dialect.isCommonSql(studioMetaStoreDTO.getDialect())) {
String baseStatement = FlinkQuery.useCatalog(studioMetaStoreDTO.getCatalog()) String catalogName = studioMetaStoreDTO.getCatalog();
+ FlinkQuery.separator() String database = studioMetaStoreDTO.getDatabase();
+ FlinkQuery.useDatabase(studioMetaStoreDTO.getDatabase()) String tableName = studioMetaStoreDTO.getTable();
+ FlinkQuery.separator(); String envSql = taskService.buildEnvSql(studioMetaStoreDTO);
JobManager jobManager = getJobManager(studioMetaStoreDTO, envSql);
// desc tables CustomTableEnvironment customTableEnvironment =
String tableStatement = baseStatement + FlinkQuery.descTable(studioMetaStoreDTO.getTable()); jobManager.getExecutor().getCustomTableEnvironment();
studioMetaStoreDTO.setStatement(tableStatement); columns.addAll(
IResult result = executeMSFlinkSql(studioMetaStoreDTO); FlinkTableMetadataUtil.getColumnList(customTableEnvironment, catalogName, database, tableName));
if (result instanceof DDLResult) {
DDLResult ddlResult = (DDLResult) result;
List<Map<String, Object>> rowData = ddlResult.getRowData();
int i = 1;
for (Map<String, Object> item : rowData) {
FlinkColumn column = FlinkColumn.build(
i,
item.get(FlinkQuery.columnName()).toString(),
item.get(FlinkQuery.columnType()).toString(),
item.get(FlinkQuery.columnKey()).toString(),
item.get(FlinkQuery.columnNull()).toString(),
item.get(FlinkQuery.columnExtras()).toString(),
item.get(FlinkQuery.columnWatermark()).toString());
columns.add(column);
i++;
}
}
} }
return columns; return columns;
} }
private JobManager getJobManager(StudioMetaStoreDTO studioMetaStoreDTO, String envSql) {
JobManager jobManager = jobManagerCache.get(envSql, () -> {
JobConfig config = studioMetaStoreDTO.getJobConfig();
JobManager jobManagerTmp = JobManager.build(config);
jobManagerTmp.executeDDL(envSql);
return jobManagerTmp;
});
return jobManager;
}
private List<String> showInfo(StudioMetaStoreDTO studioMetaStoreDTO, String baseStatement, String statement) { private List<String> showInfo(StudioMetaStoreDTO studioMetaStoreDTO, String baseStatement, String statement) {
List<String> infos = new ArrayList<>(); List<String> infos = new ArrayList<>();
studioMetaStoreDTO.setStatement(baseStatement + statement); studioMetaStoreDTO.setStatement(baseStatement + statement);
......
...@@ -1766,7 +1766,7 @@ INSERT INTO `dinky_sys_menu` VALUES (32, 1, '作业监控', '/home/jobOverView', ...@@ -1766,7 +1766,7 @@ INSERT INTO `dinky_sys_menu` VALUES (32, 1, '作业监控', '/home/jobOverView',
INSERT INTO `dinky_sys_menu` VALUES (33, 1, '数据开发', '/home/devOverView', 'DevOverView', 'home:devOverView', 'AimOutlined', 'F', 0, 3, '2023-08-15 16:54:47', '2023-09-26 14:49:00', null); INSERT INTO `dinky_sys_menu` VALUES (33, 1, '数据开发', '/home/devOverView', 'DevOverView', 'home:devOverView', 'AimOutlined', 'F', 0, 3, '2023-08-15 16:54:47', '2023-09-26 14:49:00', null);
INSERT INTO `dinky_sys_menu` VALUES (34, 5, '项目列表', '/datastudio/left/project', null, 'datastudio:left:project', 'ConsoleSqlOutlined', 'F', 0, 5, '2023-09-01 18:00:39', '2023-09-26 14:49:31', null); INSERT INTO `dinky_sys_menu` VALUES (34, 5, '项目列表', '/datastudio/left/project', null, 'datastudio:left:project', 'ConsoleSqlOutlined', 'F', 0, 5, '2023-09-01 18:00:39', '2023-09-26 14:49:31', null);
INSERT INTO `dinky_sys_menu` VALUES (35, 5, '元数据', '/datastudio/left/metadata', null, 'datastudio:left:metadata', 'TableOutlined', 'F', 0, 7, '2023-09-01 18:01:09', '2023-09-26 14:49:42', null); INSERT INTO `dinky_sys_menu` VALUES (35, 5, '元数据', '/datastudio/left/metadata', null, 'datastudio:left:metadata', 'TableOutlined', 'F', 0, 7, '2023-09-01 18:01:09', '2023-09-26 14:49:42', null);
INSERT INTO `dinky_sys_menu` VALUES (36, 5, '结构', '/datastudio/left/structure', null, 'datastudio:left:structure', 'DatabaseOutlined', 'F', 0, 6, '2023-09-01 18:01:30', '2023-09-26 14:49:54', null); INSERT INTO `dinky_sys_menu` VALUES (36, 5, 'catalog', '/datastudio/left/catalog', null, 'datastudio:left:structure', 'DatabaseOutlined', 'F', 0, 6, '2023-09-01 18:01:30', '2023-09-26 14:49:54', null);
INSERT INTO `dinky_sys_menu` VALUES (37, 5, '作业配置', '/datastudio/right/jobConfig', null, 'datastudio:right:jobConfig', 'SettingOutlined', 'F', 0, 8, '2023-09-01 18:02:15', '2023-09-26 14:50:24', null); INSERT INTO `dinky_sys_menu` VALUES (37, 5, '作业配置', '/datastudio/right/jobConfig', null, 'datastudio:right:jobConfig', 'SettingOutlined', 'F', 0, 8, '2023-09-01 18:02:15', '2023-09-26 14:50:24', null);
INSERT INTO `dinky_sys_menu` VALUES (38, 5, '执行配置', '/datastudio/right/executeConfig', null, 'datastudio:right:executeConfig', 'ExperimentOutlined', 'F', 0, 9, '2023-09-01 18:03:08', '2023-09-26 14:50:54', null); INSERT INTO `dinky_sys_menu` VALUES (38, 5, '执行配置', '/datastudio/right/executeConfig', null, 'datastudio:right:executeConfig', 'ExperimentOutlined', 'F', 0, 9, '2023-09-01 18:03:08', '2023-09-26 14:50:54', null);
INSERT INTO `dinky_sys_menu` VALUES (39, 5, '版本历史', '/datastudio/right/historyVision', null, 'datastudio:right:historyVision', 'HistoryOutlined', 'F', 0, 10, '2023-09-01 18:03:29', '2023-09-26 14:51:03', null); INSERT INTO `dinky_sys_menu` VALUES (39, 5, '版本历史', '/datastudio/right/historyVision', null, 'datastudio:right:historyVision', 'HistoryOutlined', 'F', 0, 10, '2023-09-01 18:03:29', '2023-09-26 14:51:03', null);
......
...@@ -27,8 +27,6 @@ public interface TableEnvironmentInstance { ...@@ -27,8 +27,6 @@ public interface TableEnvironmentInstance {
TableEnvironment getTableEnvironment(); TableEnvironment getTableEnvironment();
default void injectParser(CustomParser parser) {} default void injectParser(CustomParser parser) {}
;
default void injectExtendedExecutor(CustomExtendedOperationExecutor extendedExecutor) {} default void injectExtendedExecutor(CustomExtendedOperationExecutor extendedExecutor) {}
;
} }
/*
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.dinky.utils;
import org.dinky.data.enums.ColumnType;
import org.dinky.data.model.Catalog;
import org.dinky.data.model.Column;
import org.dinky.data.model.Schema;
import org.dinky.data.model.Table;
import org.dinky.executor.CustomTableEnvironment;
import org.apache.flink.table.catalog.ObjectIdentifier;
import org.apache.flink.table.types.logical.DecimalType;
import org.apache.flink.table.types.logical.LogicalType;
import org.apache.flink.table.types.logical.TimestampType;
import org.apache.flink.table.types.logical.VarCharType;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
public class FlinkTableMetadataUtil {
public static List<Catalog> getCatalog(CustomTableEnvironment customTableEnvironment) {
List<Catalog> catalogs = new ArrayList<>();
for (String catalogName : customTableEnvironment.listCatalogs()) {
Catalog catalog = Catalog.build(catalogName);
List<Schema> schemas = new ArrayList<>();
customTableEnvironment.useCatalog(catalogName);
for (String database : customTableEnvironment.listDatabases()) {
Schema schema = Schema.build(database);
schemas.add(schema);
}
catalog.setSchemas(schemas);
catalogs.add(catalog);
}
return catalogs;
}
public static void setSchemaInfo(
CustomTableEnvironment customTableEnvironment,
String catalogName,
String database,
Schema schema,
List<Table> tables) {
customTableEnvironment.useCatalog(catalogName);
customTableEnvironment.useDatabase(database);
for (String tableName : customTableEnvironment.getCatalogManager().listTables(catalogName, database)) {
Table table = Table.build(tableName, catalogName);
tables.add(table);
}
schema.setTables(tables);
// show views
schema.setViews(Arrays.asList(customTableEnvironment.listViews()));
// show functions
schema.setFunctions(Arrays.asList(customTableEnvironment.listFunctions()));
// show user functions
schema.setUserFunctions(Arrays.asList(customTableEnvironment.listUserDefinedFunctions()));
// show modules
schema.setModules(Arrays.asList(customTableEnvironment.listModules()));
}
public static List<Column> getColumnList(
CustomTableEnvironment customTableEnvironment, String catalogName, String database, String tableName) {
List<Column> columns = new ArrayList<>();
customTableEnvironment
.getCatalogManager()
.getTable(ObjectIdentifier.of(catalogName, database, tableName))
.ifPresent(t -> {
for (int i = 0; i < t.getResolvedSchema().getColumns().size(); i++) {
org.apache.flink.table.catalog.Column flinkColumn =
t.getResolvedSchema().getColumns().get(i);
AtomicBoolean isPrimaryKey = new AtomicBoolean(false);
t.getResolvedSchema().getPrimaryKey().ifPresent(k -> {
isPrimaryKey.set(k.getColumns().contains(flinkColumn.getName()));
});
LogicalType logicalType = flinkColumn.getDataType().getLogicalType();
Column column = Column.builder()
.name(flinkColumn.getName())
.type(logicalType.getTypeRoot().name())
.keyFlag(isPrimaryKey.get())
.isNullable(logicalType.isNullable())
.position(i)
.build();
if (logicalType instanceof VarCharType) {
column.setLength(((VarCharType) logicalType).getLength());
} else if (logicalType instanceof TimestampType) {
column.setLength(((TimestampType) logicalType).getPrecision());
} else if (logicalType instanceof DecimalType) {
column.setLength(((DecimalType) logicalType).getPrecision());
column.setScale(((DecimalType) logicalType).getScale());
}
for (ColumnType columnType : ColumnType.values()) {
if (columnType
.getJavaType()
.equals(flinkColumn
.getDataType()
.getConversionClass()
.getName())) {
column.setJavaType(columnType);
break;
}
}
// FlinkColumn flinkColumn = FlinkColumn.build(i,
// column.getName(), column.getDataType().getConversionClass().getName(),
// isPrimaryKey.get(), column.getDataType().getLogicalType().isNullable(),
// column.explainExtras().orElse(""), "", column.getComment().orElse(""));
columns.add(column);
}
});
return columns;
}
}
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
package org.dinky.data.enums; package org.dinky.data.enums;
import com.fasterxml.jackson.annotation.JsonValue;
/** /**
* ColumnType * ColumnType
* *
...@@ -63,6 +65,7 @@ public enum ColumnType { ...@@ -63,6 +65,7 @@ public enum ColumnType {
this.flinkType = flinkType; this.flinkType = flinkType;
} }
@JsonValue
public String getJavaType() { public String getJavaType() {
return javaType; return javaType;
} }
......
...@@ -38,15 +38,23 @@ public class FlinkColumn implements Serializable { ...@@ -38,15 +38,23 @@ public class FlinkColumn implements Serializable {
private int position; private int position;
private String name; private String name;
private String type; private String type;
private String key; private Boolean key;
private String nullable; private Boolean nullable;
private String extras; private String extras;
private String watermark; private String watermark;
private String comment;
public FlinkColumn() {} public FlinkColumn() {}
public FlinkColumn( public FlinkColumn(
int position, String name, String type, String key, String nullable, String extras, String watermark) { int position,
String name,
String type,
boolean key,
boolean nullable,
String extras,
String watermark,
String comment) {
this.position = position; this.position = position;
this.name = name; this.name = name;
this.type = type; this.type = type;
...@@ -54,10 +62,18 @@ public class FlinkColumn implements Serializable { ...@@ -54,10 +62,18 @@ public class FlinkColumn implements Serializable {
this.nullable = nullable; this.nullable = nullable;
this.extras = extras; this.extras = extras;
this.watermark = watermark; this.watermark = watermark;
this.comment = comment;
} }
public static FlinkColumn build( public static FlinkColumn build(
int position, String name, String type, String key, String nullable, String extras, String watermark) { int position,
return new FlinkColumn(position, name, type, key, nullable, extras, watermark); String name,
String type,
boolean key,
boolean nullable,
String extras,
String watermark,
String comment) {
return new FlinkColumn(position, name, type, key, nullable, extras, watermark, comment);
} }
} }
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<parent> <parent>
<groupId>org.dinky</groupId> <groupId>org.dinky</groupId>
<artifactId>dinky</artifactId> <artifactId>dinky</artifactId>
<version>1.0.0-SNAPSHOT</version> <version>${revision}</version>
</parent> </parent>
<artifactId>dinky-web</artifactId> <artifactId>dinky-web</artifactId>
...@@ -31,6 +31,15 @@ ...@@ -31,6 +31,15 @@
<build> <build>
<finalName>${project.artifactId}-${project.version}</finalName> <finalName>${project.artifactId}-${project.version}</finalName>
<resources>
<resource>
<filtering>true</filtering>
<directory>/src/services/</directory>
<includes>
<include>constants.tsx</include>
</includes>
</resource>
</resources>
<plugins> <plugins>
<!-- 调用npm命令插件 --> <!-- 调用npm命令插件 -->
<plugin> <plugin>
......
...@@ -78,7 +78,7 @@ export default { ...@@ -78,7 +78,7 @@ export default {
'menu.version': 'Version: {version}', 'menu.version': 'Version: {version}',
'menu.datastudio.project': 'Project', 'menu.datastudio.project': 'Project',
'menu.datastudio.structure': 'Structure', 'menu.datastudio.catalog': 'Catalog',
'menu.datastudio.metadata': 'Metadata', 'menu.datastudio.metadata': 'Metadata',
'menu.datastudio.console': 'Console', 'menu.datastudio.console': 'Console',
'menu.datastudio.jobConfig': 'Job Config', 'menu.datastudio.jobConfig': 'Job Config',
......
...@@ -78,7 +78,7 @@ export default { ...@@ -78,7 +78,7 @@ export default {
'menu.version': '版本:{version}', 'menu.version': '版本:{version}',
'menu.datastudio.project': '项目', 'menu.datastudio.project': '项目',
'menu.datastudio.structure': '结构', 'menu.datastudio.catalog': 'Catalog',
'menu.datastudio.metadata': '元数据', 'menu.datastudio.metadata': '元数据',
'menu.datastudio.console': '控制台', 'menu.datastudio.console': '控制台',
'menu.datastudio.jobConfig': '作业配置', 'menu.datastudio.jobConfig': '作业配置',
......
...@@ -390,6 +390,13 @@ export default { ...@@ -390,6 +390,13 @@ export default {
'pages.datastudio.label.version.rollback.flinksql': '回滚Flink SQL版本', 'pages.datastudio.label.version.rollback.flinksql': '回滚Flink SQL版本',
'pages.datastudio.label.version.rollback.flinksqlConfirm': 'pages.datastudio.label.version.rollback.flinksqlConfirm':
'确定回滚Flink SQL版本至【{versionId}】吗?', '确定回滚Flink SQL版本至【{versionId}】吗?',
'pages.datastudio.catalog.flinkSqlEnvSelect':'请选择 FlinkSqlEnv',
'pages.datastudio.catalog.catalogSelect':'请选择 catalog & database',
'pages.datastudio.catalog.tableInfo':'表信息',
'pages.datastudio.catalog.fieldInformation':'字段信息',
'pages.datastudio.print.table.inputTableName': '请选择表名', 'pages.datastudio.print.table.inputTableName': '请选择表名',
'pages.devops.jobinfo.localenv': '本地环境', 'pages.devops.jobinfo.localenv': '本地环境',
'pages.metadata.DataSearch': '数据查询', 'pages.metadata.DataSearch': '数据查询',
......
import {DataNode} from "antd/es/tree";
import {DataSources} from "@/types/RegCenter/data";
export type StudioMetaStoreParam = {
statement?: string,
fragment?: boolean,
dialect?: string,
envId?: number,
databaseId?: number,
catalog?: string,
database?: string,
table?: string,
}
export type TableDataNode = {
isTable: boolean,
} & DataNode &DataSources.Table
\ No newline at end of file
import React, {useEffect, useState} from "react";
import {useRequest} from "@@/exports";
import {Button, Col, Empty, message, Modal, Row, Select, Spin, Tabs, Tooltip} from "antd";
import {getMSCatalogs, getMSFlinkColumns, getMSSchemaInfo} from "./service";
import {MetaStoreTableType} from "@/pages/DataStudio/model";
import {
AppstoreOutlined,
BlockOutlined, CodepenOutlined,
DownOutlined,
FunctionOutlined, ReloadOutlined,
TableOutlined
} from "@ant-design/icons";
import DirectoryTree from "antd/es/tree/DirectoryTree";
import {l} from "@/utils/intl";
import {DataNode} from "antd/es/tree";
import {DefaultOptionType} from "rc-select/lib/Select";
import {TableDataNode} from "@/pages/DataStudio/LeftContainer/Catalog/data";
import TableInfo from "@/pages/RegCenter/DataSource/components/DataSourceDetail/RightTagsRouter/SchemaDesc/TableInfo";
import ColumnInfo from "@/pages/RegCenter/DataSource/components/DataSourceDetail/RightTagsRouter/SchemaDesc/ColumnInfo";
import {BtnRoute} from "@/pages/DataStudio/route";
import {clearMetaDataTable} from "@/pages/DataStudio/LeftContainer/MetaData/service";
export const Catalog: React.FC = (props: any) => {
const data = useRequest({
url: "/api/task/listFlinkSQLEnv"
});
const [envId, setEnvId] = useState<number>();
const [catalogSelect, setCatalogSelect] = useState<DefaultOptionType[]>([]);
const [catalog, setCatalog] = useState<string>('default_catalog');
const [database, setDatabase] = useState<string>('');
const [table, setTable] = useState<string>('');
const [treeData, setTreeData] = useState<DataNode[]>([]);
const [modalVisit, setModalVisit] = useState(false);
const [row, setRow] = useState<TableDataNode>();
const [loading, setLoading] = useState<boolean>(false);
const [columnData, setColumnData] = useState([]);
BtnRoute['menu.datastudio.catalog'][0].onClick = () => {
refreshMetaStoreTables()
};
useEffect(() => {
if (envId) {
setLoading(true)
setTreeData([])
setCatalogSelect([])
setDatabase('')
let param = {
envId: envId,
fragment: true,
dialect: "FlinkSqlEnv",
};
getMSCatalogs(param).then(d => {
setCatalogSelect((d as any[]).map(item => {
setLoading(false)
return {
label: item.name,
options: (item.schemas as any[]).map(schema => {
return {
label: schema.name,
value: item.name + '.' + schema.name
}
})
}
}))
})
}
}, [envId])
useEffect(() => {
if (table) {
setLoading(true)
setColumnData([])
getMSFlinkColumns({
envId, catalog, database, table
}).then(res => {
setLoading(false)
setColumnData(res)
})
}
}, [table])
const onRefreshTreeData = (catalogAndDatabase: string) => {
setTreeData([])
setLoading(true)
const names = catalogAndDatabase.split('.');
let catalogTmp = 'default_catalog';
let databaseTmp = 'default_database';
if (names.length > 1) {
catalogTmp = names[0];
databaseTmp = names[1];
} else if (names.length == 1) {
databaseTmp = names[0];
}
setCatalog(catalogTmp);
setDatabase(databaseTmp);
let param = {
envId: envId,
fragment: true,
dialect: "FlinkSqlEnv",
catalog: catalogTmp,
database: databaseTmp,
};
const result = getMSSchemaInfo(param);
result.then(res => {
setLoading(false)
const tables: MetaStoreTableType[] = [];
if (res.tables) {
for (let i = 0; i < res.tables.length; i++) {
tables.push({
name: res.tables[i].name,
columns: res.tables[i].columns,
});
}
}
const treeDataTmp: DataNode[] = [];
const tablesData: TableDataNode[] = [];
for (let i = 0; i < tables.length; i++) {
tablesData.push({
title: tables[i].name,
key: tables[i].name,
icon: <TableOutlined/>,
isLeaf: true,
isTable: true,
name: tables[i].name,
schema: databaseTmp,
catalog: catalog,
comment: '-',
type: '',
engine: 'Flink',
options: '',
rows: -1,
createTime: '',
updateTime: '',
})
}
treeDataTmp.push({
title: 'tables',
key: 'tables',
children: tablesData,
});
const viewsData: DataNode[] = [];
if (res.views) {
for (let i = 0; i < res.views.length; i++) {
viewsData.push({
title: res.views[i],
key: res.views[i],
icon: <BlockOutlined/>,
isLeaf: true,
});
}
}
treeDataTmp.push({
title: 'views',
key: 'views',
children: viewsData,
});
const functionsData: DataNode[] = [];
if (res.functions) {
for (let i = 0; i < res.functions.length; i++) {
functionsData.push({
title: res.functions[i],
key: res.functions[i],
icon: <FunctionOutlined/>,
isLeaf: true,
});
}
}
treeDataTmp.push({
title: 'functions',
key: 'functions',
children: functionsData,
});
const userFunctionsData: DataNode[] = [];
if (res.userFunctions) {
for (let i = 0; i < res.userFunctions.length; i++) {
userFunctionsData.push({
title: res.userFunctions[i],
key: res.userFunctions[i],
icon: <FunctionOutlined/>,
isLeaf: true,
});
}
}
treeDataTmp.push({
title: 'user functions',
key: 'userFunctions',
children: userFunctionsData,
});
const modulesData: DataNode[] = [];
if (res.modules) {
for (let i = 0; i < res.modules.length; i++) {
modulesData.push({
title: res.modules[i],
key: res.modules[i],
icon: <AppstoreOutlined/>,
isLeaf: true,
});
}
}
treeDataTmp.push({
title: 'modules',
key: 'modules',
children: modulesData,
});
setTreeData(treeDataTmp);
})
};
const refreshMetaStoreTables = () => {
onRefreshTreeData(catalog + '.' + database);
};
const onChangeMetaStoreCatalogs = (value: string) => {
onRefreshTreeData(value);
};
const openColumnInfo = (e: React.MouseEvent, node: TableDataNode) => {
if (node.isLeaf && node.isTable) {
setTable(node.name);
setRow(node);
setModalVisit(true);
}
};
const cancelHandle = () => {
setRow(undefined);
setModalVisit(false);
};
return (
<Spin spinning={loading}>
<div style={{paddingInline: 10}}>
<Row>
<Col span={24}>
<Select
placeholder={l('pages.datastudio.catalog.flinkSqlEnvSelect')}
style={{width: '100%'}}
onChange={setEnvId}
options={(data.data as any[])?.map(x => {
return {value: x.id, label: x.name}
})}
/>
<Select
value={database?database:null}
style={{width: '100%'}}
placeholder={l('pages.datastudio.catalog.catalogSelect')}
optionLabelProp="label"
onChange={onChangeMetaStoreCatalogs}
options={catalogSelect}
/>
</Col>
</Row>
{treeData.length > 0 ? (
<DirectoryTree
showIcon
switcherIcon={<DownOutlined/>}
treeData={treeData}
onRightClick={({event, node}: any) => {
openColumnInfo(event, node)
}}
/>) : (<Empty image={Empty.PRESENTED_IMAGE_SIMPLE}/>)}
</div>
<Modal
title={<>{row?.key}</> ?? <></>}
open={modalVisit}
width={10000}
onCancel={() => {
cancelHandle();
}}
footer={[
<Button key="back" onClick={() => {
cancelHandle();
}}>
{l('button.close')}
</Button>,
]}
>
<Tabs defaultActiveKey="tableInfo" size="small" items={[
{
key: 'tableInfo',
label: <span><TableOutlined/>{l('pages.datastudio.catalog.tableInfo')}</span>,
children: row ? <TableInfo tableInfo={row}/> : <Empty image={Empty.PRESENTED_IMAGE_SIMPLE}/>,
}, {
key: 'columnsInfo',
label: <span><CodepenOutlined/>{l('pages.datastudio.catalog.fieldInformation')}</span>,
children: <Spin spinning={loading}>{<ColumnInfo columnInfo={columnData}/>}</Spin>,
}
]}/>
</Modal>
</Spin>
);
}
import {postAll} from "@/services/api";
import {StudioMetaStoreParam} from "@/pages/DataStudio/LeftContainer/Catalog/data";
import {getDataByParams, getDataByParamsReturnResult, queryDataByParams} from "@/services/BusinessCrud";
export async function getMSSchemaInfo(params: StudioMetaStoreParam) {
return (await postAll('/api/studio/getMSSchemaInfo',params)).datas;
}
export async function getMSCatalogs(params: StudioMetaStoreParam) {
return (await postAll('/api/studio/getMSCatalogs',params)).datas;
}
export async function getMSFlinkColumns(params: StudioMetaStoreParam) {
return (await getDataByParamsReturnResult('/api/studio/getMSFlinkColumns',params)).datas;
}
\ No newline at end of file
...@@ -70,7 +70,7 @@ const JobModal: React.FC<JobModalProps> = (props) => { ...@@ -70,7 +70,7 @@ const JobModal: React.FC<JobModalProps> = (props) => {
}; };
useEffect(() => { useEffect(() => {
if (isUDF(jobType)) queryUdfTemplate(); isUDF(jobType) && queryUdfTemplate();
}, [jobType, form]); }, [jobType, form]);
/** /**
...@@ -102,7 +102,7 @@ const JobModal: React.FC<JobModalProps> = (props) => { ...@@ -102,7 +102,7 @@ const JobModal: React.FC<JobModalProps> = (props) => {
onSubmit({ ...values, ...formData } as Catalogue); onSubmit({ ...values, ...formData } as Catalogue);
}; };
const RenderForm = () => { const renderForm = () => {
return ( return (
<> <>
<ProFormSelect <ProFormSelect
...@@ -110,7 +110,6 @@ const JobModal: React.FC<JobModalProps> = (props) => { ...@@ -110,7 +110,6 @@ const JobModal: React.FC<JobModalProps> = (props) => {
label={l('catalog.type')} label={l('catalog.type')}
tooltip={l('catalog.type.tip')} tooltip={l('catalog.type.tip')}
options={JOB_TYPE} options={JOB_TYPE}
initialValue={JOB_TYPE[0]['options'][0]['value']}
disabled={!!values.id} disabled={!!values.id}
placeholder={l('catalog.type.placeholder')} placeholder={l('catalog.type.placeholder')}
rules={[{ required: true, message: l('catalog.type.placeholder') }]} rules={[{ required: true, message: l('catalog.type.placeholder') }]}
...@@ -164,6 +163,7 @@ const JobModal: React.FC<JobModalProps> = (props) => { ...@@ -164,6 +163,7 @@ const JobModal: React.FC<JobModalProps> = (props) => {
}; };
return ( return (
<>
<ModalForm<Catalogue> <ModalForm<Catalogue>
title={title} title={title}
form={form} form={form}
...@@ -180,8 +180,9 @@ const JobModal: React.FC<JobModalProps> = (props) => { ...@@ -180,8 +180,9 @@ const JobModal: React.FC<JobModalProps> = (props) => {
}} }}
onFinish={async (values) => submitForm(values)} onFinish={async (values) => submitForm(values)}
> >
{RenderForm()} {renderForm()}
</ModalForm> </ModalForm>
</>
); );
}; };
......
...@@ -55,6 +55,7 @@ import { ...@@ -55,6 +55,7 @@ import {
} from '@ant-design/icons'; } from '@ant-design/icons';
import { DiffEditor } from '@monaco-editor/react'; import { DiffEditor } from '@monaco-editor/react';
import { ReactNode } from 'react'; import { ReactNode } from 'react';
import {Catalog} from "@/pages/DataStudio/LeftContainer/Catalog";
export const LeftSide = [ export const LeftSide = [
{ {
...@@ -65,11 +66,11 @@ export const LeftSide = [ ...@@ -65,11 +66,11 @@ export const LeftSide = [
children: <Project /> children: <Project />
}, },
{ {
auth: '/datastudio/left/structure', auth: '/datastudio/left/catalog',
key: 'menu.datastudio.structure', key: 'menu.datastudio.catalog',
icon: <TableOutlined />, icon: <TableOutlined />,
label: l('menu.datastudio.structure'), label: l('menu.datastudio.catalog'),
children: <div>structure</div> children: <Catalog />
}, },
{ {
auth: '/datastudio/left/metadata', auth: '/datastudio/left/metadata',
...@@ -252,6 +253,13 @@ export const BtnRoute: { [c: string]: CircleDataStudioButtonProps[] } = { ...@@ -252,6 +253,13 @@ export const BtnRoute: { [c: string]: CircleDataStudioButtonProps[] } = {
onClick: () => {} onClick: () => {}
} }
], ],
'menu.datastudio.catalog': [
{
icon: <ReloadOutlined />,
title: l('button.refresh'),
onClick: () => {}
}
],
'menu.datastudio.project': [ 'menu.datastudio.project': [
{ {
icon: <PlusCircleOutlined />, icon: <PlusCircleOutlined />,
......
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { DataSources } from '@/types/RegCenter/data';
import { transformTreeData } from '@/utils/function';
import { l } from '@/utils/intl';
import { CheckSquareOutlined, KeyOutlined } from '@ant-design/icons';
import { ProTable } from '@ant-design/pro-components';
import { ProColumns } from '@ant-design/pro-table/es/typing';
import React from 'react';
type ColumnInfoProps = {
columnInfo: Partial<DataSources.Column[]>;
};
const ColumnInfo: React.FC<ColumnInfoProps> = (props) => {
const { columnInfo } = props;
const columns: ProColumns<DataSources.Column>[] = [
{
title: l('rc.ds.no'),
dataIndex: 'position',
width: '4%'
},
{
title: l('rc.ds.columnName'),
dataIndex: 'name',
width: '10%',
ellipsis: true
},
{
title: l('rc.ds.columnType'),
dataIndex: 'type',
width: '6%'
},
{
title: l('rc.ds.primarykey'),
dataIndex: 'keyFlag',
width: '4%',
render: (_, record) => {
return record.keyFlag ? <KeyOutlined style={{ color: '#FAA100' }} /> : undefined;
}
},
{
title: l('rc.ds.autoIncrement'),
dataIndex: 'autoIncrement',
width: '4%',
render: (_, record) => {
return record.autoIncrement ? (
<CheckSquareOutlined style={{ color: '#1296db' }} />
) : undefined;
}
},
{
title: l('rc.ds.isNull'),
dataIndex: 'nullable',
width: '4%',
render: (_, record) => {
return !record.nullable ? <CheckSquareOutlined style={{ color: '#1296db' }} /> : undefined;
}
},
{
title: l('rc.ds.default'),
dataIndex: 'defaultValue',
ellipsis: true,
width: '8%'
},
{
title: l('rc.ds.length'),
dataIndex: 'length',
width: '4%'
},
{
title: l('rc.ds.precision'),
dataIndex: 'precision',
width: '4%'
},
{
title: l('rc.ds.decimalDigits'),
dataIndex: 'scale',
ellipsis: true,
width: '6%'
},
{
title: l('rc.ds.character'),
dataIndex: 'characterSet',
width: '6%',
ellipsis: true
},
{
title: l('rc.ds.collationRule'),
dataIndex: 'collation',
width: '10%',
ellipsis: true
},
{
title: l('rc.ds.javaType'),
dataIndex: 'javaType',
ellipsis: true,
width: '8%'
},
{
title: l('rc.ds.comment'),
dataIndex: 'comment',
ellipsis: true
}
];
return (
<>
<ProTable<DataSources.Column>
toolBarRender={false}
pagination={{
defaultPageSize: 14,
hideOnSinglePage: true
}}
search={false}
options={false}
size={'small'}
bordered
columns={columns}
dataSource={transformTreeData(columnInfo) as DataSources.Column[]}
/>
</>
);
};
export default ColumnInfo;
...@@ -21,7 +21,7 @@ import { DataSources } from '@/types/RegCenter/data'; ...@@ -21,7 +21,7 @@ import { DataSources } from '@/types/RegCenter/data';
import { l } from '@/utils/intl'; import { l } from '@/utils/intl';
import { Empty } from 'antd'; import { Empty } from 'antd';
import React from 'react'; import React from 'react';
import ColumnInfo from './ColumnInfo/Index'; import ColumnInfo from "@/pages/RegCenter/DataSource/components/DataSourceDetail/RightTagsRouter/SchemaDesc/ColumnInfo";
type SchemaDescProps = { type SchemaDescProps = {
tableInfo: Partial<DataSources.Table>; tableInfo: Partial<DataSources.Table>;
......
...@@ -1184,7 +1184,7 @@ INSERT INTO `dinky_sys_menu` VALUES (32, 1, '作业监控', '/home/jobOverView', ...@@ -1184,7 +1184,7 @@ INSERT INTO `dinky_sys_menu` VALUES (32, 1, '作业监控', '/home/jobOverView',
INSERT INTO `dinky_sys_menu` VALUES (33, 1, '数据开发', '/home/devOverView', 'DevOverView', 'home:devOverView', 'AimOutlined', 'F', 0, 3, '2023-08-15 16:54:47', '2023-09-26 14:49:00', null); INSERT INTO `dinky_sys_menu` VALUES (33, 1, '数据开发', '/home/devOverView', 'DevOverView', 'home:devOverView', 'AimOutlined', 'F', 0, 3, '2023-08-15 16:54:47', '2023-09-26 14:49:00', null);
INSERT INTO `dinky_sys_menu` VALUES (34, 5, '项目列表', '/datastudio/left/project', null, 'datastudio:left:project', 'ConsoleSqlOutlined', 'F', 0, 5, '2023-09-01 18:00:39', '2023-09-26 14:49:31', null); INSERT INTO `dinky_sys_menu` VALUES (34, 5, '项目列表', '/datastudio/left/project', null, 'datastudio:left:project', 'ConsoleSqlOutlined', 'F', 0, 5, '2023-09-01 18:00:39', '2023-09-26 14:49:31', null);
INSERT INTO `dinky_sys_menu` VALUES (35, 5, '元数据', '/datastudio/left/metadata', null, 'datastudio:left:metadata', 'TableOutlined', 'F', 0, 7, '2023-09-01 18:01:09', '2023-09-26 14:49:42', null); INSERT INTO `dinky_sys_menu` VALUES (35, 5, '元数据', '/datastudio/left/metadata', null, 'datastudio:left:metadata', 'TableOutlined', 'F', 0, 7, '2023-09-01 18:01:09', '2023-09-26 14:49:42', null);
INSERT INTO `dinky_sys_menu` VALUES (36, 5, '结构', '/datastudio/left/structure', null, 'datastudio:left:structure', 'DatabaseOutlined', 'F', 0, 6, '2023-09-01 18:01:30', '2023-09-26 14:49:54', null); INSERT INTO `dinky_sys_menu` VALUES (36, 5, 'catalog', '/datastudio/left/catalog', null, 'datastudio:left:structure', 'DatabaseOutlined', 'F', 0, 6, '2023-09-01 18:01:30', '2023-09-26 14:49:54', null);
INSERT INTO `dinky_sys_menu` VALUES (37, 5, '作业配置', '/datastudio/right/jobConfig', null, 'datastudio:right:jobConfig', 'SettingOutlined', 'F', 0, 8, '2023-09-01 18:02:15', '2023-09-26 14:50:24', null); INSERT INTO `dinky_sys_menu` VALUES (37, 5, '作业配置', '/datastudio/right/jobConfig', null, 'datastudio:right:jobConfig', 'SettingOutlined', 'F', 0, 8, '2023-09-01 18:02:15', '2023-09-26 14:50:24', null);
INSERT INTO `dinky_sys_menu` VALUES (38, 5, '执行配置', '/datastudio/right/executeConfig', null, 'datastudio:right:executeConfig', 'ExperimentOutlined', 'F', 0, 9, '2023-09-01 18:03:08', '2023-09-26 14:50:54', null); INSERT INTO `dinky_sys_menu` VALUES (38, 5, '执行配置', '/datastudio/right/executeConfig', null, 'datastudio:right:executeConfig', 'ExperimentOutlined', 'F', 0, 9, '2023-09-01 18:03:08', '2023-09-26 14:50:54', null);
INSERT INTO `dinky_sys_menu` VALUES (39, 5, '版本历史', '/datastudio/right/historyVision', null, 'datastudio:right:historyVision', 'HistoryOutlined', 'F', 0, 10, '2023-09-01 18:03:29', '2023-09-26 14:51:03', null); INSERT INTO `dinky_sys_menu` VALUES (39, 5, '版本历史', '/datastudio/right/historyVision', null, 'datastudio:right:historyVision', 'HistoryOutlined', 'F', 0, 10, '2023-09-01 18:03:29', '2023-09-26 14:51:03', null);
......
...@@ -2228,7 +2228,7 @@ INSERT INTO "public"."dinky_sys_menu" VALUES (32, 1, '作业监控', '/home/job ...@@ -2228,7 +2228,7 @@ INSERT INTO "public"."dinky_sys_menu" VALUES (32, 1, '作业监控', '/home/job
INSERT INTO "public"."dinky_sys_menu" VALUES (33, 1, '数据开发', '/home/devOverView', 'DevOverView', 'home:devOverView', 'AimOutlined', 'F', 0, 3, '2023-08-15 16:54:47', '2023-09-26 14:49:00', null); INSERT INTO "public"."dinky_sys_menu" VALUES (33, 1, '数据开发', '/home/devOverView', 'DevOverView', 'home:devOverView', 'AimOutlined', 'F', 0, 3, '2023-08-15 16:54:47', '2023-09-26 14:49:00', null);
INSERT INTO "public"."dinky_sys_menu" VALUES (34, 5, '项目列表', '/datastudio/left/project', null, 'datastudio:left:project', 'ConsoleSqlOutlined', 'F', 0, 5, '2023-09-01 18:00:39', '2023-09-26 14:49:31', null); INSERT INTO "public"."dinky_sys_menu" VALUES (34, 5, '项目列表', '/datastudio/left/project', null, 'datastudio:left:project', 'ConsoleSqlOutlined', 'F', 0, 5, '2023-09-01 18:00:39', '2023-09-26 14:49:31', null);
INSERT INTO "public"."dinky_sys_menu" VALUES (35, 5, '元数据', '/datastudio/left/metadata', null, 'datastudio:left:metadata', 'TableOutlined', 'F', 0, 7, '2023-09-01 18:01:09', '2023-09-26 14:49:42', null); INSERT INTO "public"."dinky_sys_menu" VALUES (35, 5, '元数据', '/datastudio/left/metadata', null, 'datastudio:left:metadata', 'TableOutlined', 'F', 0, 7, '2023-09-01 18:01:09', '2023-09-26 14:49:42', null);
INSERT INTO "public"."dinky_sys_menu" VALUES (36, 5, '结构', '/datastudio/left/structure', null, 'datastudio:left:structure', 'DatabaseOutlined', 'F', 0, 6, '2023-09-01 18:01:30', '2023-09-26 14:49:54', null); INSERT INTO "public"."dinky_sys_menu" VALUES (36, 5, 'catalog', '/datastudio/left/catalog', null, 'datastudio:left:structure', 'DatabaseOutlined', 'F', 0, 6, '2023-09-01 18:01:30', '2023-09-26 14:49:54', null);
INSERT INTO "public"."dinky_sys_menu" VALUES (37, 5, '作业配置', '/datastudio/right/jobConfig', null, 'datastudio:right:jobConfig', 'SettingOutlined', 'F', 0, 8, '2023-09-01 18:02:15', '2023-09-26 14:50:24', null); INSERT INTO "public"."dinky_sys_menu" VALUES (37, 5, '作业配置', '/datastudio/right/jobConfig', null, 'datastudio:right:jobConfig', 'SettingOutlined', 'F', 0, 8, '2023-09-01 18:02:15', '2023-09-26 14:50:24', null);
INSERT INTO "public"."dinky_sys_menu" VALUES (38, 5, '执行配置', '/datastudio/right/executeConfig', null, 'datastudio:right:executeConfig', 'ExperimentOutlined', 'F', 0, 9, '2023-09-01 18:03:08', '2023-09-26 14:50:54', null); INSERT INTO "public"."dinky_sys_menu" VALUES (38, 5, '执行配置', '/datastudio/right/executeConfig', null, 'datastudio:right:executeConfig', 'ExperimentOutlined', 'F', 0, 9, '2023-09-01 18:03:08', '2023-09-26 14:50:54', null);
INSERT INTO "public"."dinky_sys_menu" VALUES (39, 5, '版本历史', '/datastudio/right/historyVision', null, 'datastudio:right:historyVision', 'HistoryOutlined', 'F', 0, 10, '2023-09-01 18:03:29', '2023-09-26 14:51:03', null); INSERT INTO "public"."dinky_sys_menu" VALUES (39, 5, '版本历史', '/datastudio/right/historyVision', null, 'datastudio:right:historyVision', 'HistoryOutlined', 'F', 0, 10, '2023-09-01 18:03:29', '2023-09-26 14:51:03', null);
......
...@@ -100,7 +100,7 @@ INSERT INTO `dinky_sys_menu` VALUES (32, 1, '作业监控', '/home/jobOverView', ...@@ -100,7 +100,7 @@ INSERT INTO `dinky_sys_menu` VALUES (32, 1, '作业监控', '/home/jobOverView',
INSERT INTO `dinky_sys_menu` VALUES (33, 1, '数据开发', '/home/devOverView', 'DevOverView', 'home:devOverView', 'AimOutlined', 'F', 0, 3, '2023-08-15 16:54:47', '2023-09-26 14:49:00', null); INSERT INTO `dinky_sys_menu` VALUES (33, 1, '数据开发', '/home/devOverView', 'DevOverView', 'home:devOverView', 'AimOutlined', 'F', 0, 3, '2023-08-15 16:54:47', '2023-09-26 14:49:00', null);
INSERT INTO `dinky_sys_menu` VALUES (34, 5, '项目列表', '/datastudio/left/project', null, 'datastudio:left:project', 'ConsoleSqlOutlined', 'F', 0, 5, '2023-09-01 18:00:39', '2023-09-26 14:49:31', null); INSERT INTO `dinky_sys_menu` VALUES (34, 5, '项目列表', '/datastudio/left/project', null, 'datastudio:left:project', 'ConsoleSqlOutlined', 'F', 0, 5, '2023-09-01 18:00:39', '2023-09-26 14:49:31', null);
INSERT INTO `dinky_sys_menu` VALUES (35, 5, '元数据', '/datastudio/left/metadata', null, 'datastudio:left:metadata', 'TableOutlined', 'F', 0, 7, '2023-09-01 18:01:09', '2023-09-26 14:49:42', null); INSERT INTO `dinky_sys_menu` VALUES (35, 5, '元数据', '/datastudio/left/metadata', null, 'datastudio:left:metadata', 'TableOutlined', 'F', 0, 7, '2023-09-01 18:01:09', '2023-09-26 14:49:42', null);
INSERT INTO `dinky_sys_menu` VALUES (36, 5, '结构', '/datastudio/left/structure', null, 'datastudio:left:structure', 'DatabaseOutlined', 'F', 0, 6, '2023-09-01 18:01:30', '2023-09-26 14:49:54', null); INSERT INTO `dinky_sys_menu` VALUES (36, 5, 'catalog', '/datastudio/left/catalog', null, 'datastudio:left:structure', 'DatabaseOutlined', 'F', 0, 6, '2023-09-01 18:01:30', '2023-09-26 14:49:54', null);
INSERT INTO `dinky_sys_menu` VALUES (37, 5, '作业配置', '/datastudio/right/jobConfig', null, 'datastudio:right:jobConfig', 'SettingOutlined', 'F', 0, 8, '2023-09-01 18:02:15', '2023-09-26 14:50:24', null); INSERT INTO `dinky_sys_menu` VALUES (37, 5, '作业配置', '/datastudio/right/jobConfig', null, 'datastudio:right:jobConfig', 'SettingOutlined', 'F', 0, 8, '2023-09-01 18:02:15', '2023-09-26 14:50:24', null);
INSERT INTO `dinky_sys_menu` VALUES (38, 5, '执行配置', '/datastudio/right/executeConfig', null, 'datastudio:right:executeConfig', 'ExperimentOutlined', 'F', 0, 9, '2023-09-01 18:03:08', '2023-09-26 14:50:54', null); INSERT INTO `dinky_sys_menu` VALUES (38, 5, '执行配置', '/datastudio/right/executeConfig', null, 'datastudio:right:executeConfig', 'ExperimentOutlined', 'F', 0, 9, '2023-09-01 18:03:08', '2023-09-26 14:50:54', null);
INSERT INTO `dinky_sys_menu` VALUES (39, 5, '版本历史', '/datastudio/right/historyVision', null, 'datastudio:right:historyVision', 'HistoryOutlined', 'F', 0, 10, '2023-09-01 18:03:29', '2023-09-26 14:51:03', null); INSERT INTO `dinky_sys_menu` VALUES (39, 5, '版本历史', '/datastudio/right/historyVision', null, 'datastudio:right:historyVision', 'HistoryOutlined', 'F', 0, 10, '2023-09-01 18:03:29', '2023-09-26 14:51:03', null);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment