forked from github/dataease
feat: 限制数据集只有一个同步任务;数据源支持修改密码和端口号
This commit is contained in:
parent
b8a64a3fc5
commit
99bae93fb5
@ -240,8 +240,7 @@ public class ExtractDataService {
|
||||
switch (updateType) {
|
||||
// 全量更新
|
||||
case all_scope:
|
||||
datasetTableTaskLog = writeDatasetTableTaskLog(datasetTableTaskLog, datasetTableId, taskId);
|
||||
// TODO before: check doris table column type
|
||||
datasetTableTaskLog = getDatasetTableTaskLog(datasetTableTaskLog, datasetTableId, taskId);
|
||||
createDorisTable(DorisTableUtils.dorisName(datasetTableId), dorisTablColumnSql);
|
||||
createDorisTable(DorisTableUtils.dorisTmpName(DorisTableUtils.dorisName(datasetTableId)), dorisTablColumnSql);
|
||||
generateTransFile("all_scope", datasetTable, datasource, datasetTableFields, null);
|
||||
@ -346,6 +345,21 @@ public class ExtractDataService {
|
||||
}
|
||||
}
|
||||
|
||||
private DatasetTableTaskLog getDatasetTableTaskLog(DatasetTableTaskLog datasetTableTaskLog, String datasetTableId, String taskId) {
|
||||
datasetTableTaskLog.setTableId(datasetTableId);
|
||||
datasetTableTaskLog.setTaskId(taskId);
|
||||
datasetTableTaskLog.setStatus(JobStatus.Underway.name());
|
||||
for (int i=0;i<5;i++){
|
||||
List<DatasetTableTaskLog> datasetTableTaskLogs = dataSetTableTaskLogService.select(datasetTableTaskLog);
|
||||
if(CollectionUtils.isNotEmpty(datasetTableTaskLogs)){
|
||||
return datasetTableTaskLogs.get(0);
|
||||
}
|
||||
}
|
||||
datasetTableTaskLog.setStartTime(System.currentTimeMillis());
|
||||
dataSetTableTaskLogService.save(datasetTableTaskLog);
|
||||
return datasetTableTaskLog;
|
||||
}
|
||||
|
||||
private void extractData(DatasetTable datasetTable, String extractType) throws Exception {
|
||||
|
||||
|
||||
|
@ -19,6 +19,9 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="form.configuration.dataSourceType=='jdbc'" :label="$t('datasource.host')" prop="configuration.host">
|
||||
<el-input v-model="form.configuration.host" autocomplete="off" :disabled="formType=='modify'" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.configuration.dataSourceType=='jdbc'" :label="$t('datasource.data_base')" prop="configuration.dataBase">
|
||||
<el-input v-model="form.configuration.dataBase" autocomplete="off" :disabled="formType=='modify'" />
|
||||
</el-form-item>
|
||||
@ -26,13 +29,10 @@
|
||||
<el-input v-model="form.configuration.username" autocomplete="off" :disabled="formType=='modify'" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.configuration.dataSourceType=='jdbc'" :label="$t('datasource.password')" prop="configuration.password">
|
||||
<el-input v-model="form.configuration.password" autocomplete="off" show-password :disabled="formType=='modify'" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.configuration.dataSourceType=='jdbc'" :label="$t('datasource.host')" prop="configuration.host">
|
||||
<el-input v-model="form.configuration.host" autocomplete="off" :disabled="formType=='modify'" />
|
||||
<el-input v-model="form.configuration.password" autocomplete="off" show-password />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.configuration.dataSourceType=='jdbc'" :label="$t('datasource.port')" prop="configuration.port">
|
||||
<el-input v-model="form.configuration.port" autocomplete="off" :disabled="formType=='modify'" />
|
||||
<el-input v-model="form.configuration.port" autocomplete="off" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
|
Loading…
Reference in New Issue
Block a user