Skip to content

Commit 678e150

Browse files
committed
fix #OBS-I558 : set id to datasource
1 parent 698e977 commit 678e150

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

api-service/src/services/DatasetService.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -345,14 +345,15 @@ class DatasetService {
345345
private updateDruidDataSource = async (draftDataset: Record<string, any>, transaction: Transaction, existingDatasource: Record<string, any>) => {
346346

347347
const liveDataset = await this.getDataset(draftDataset.dataset_id, ["id", "api_version"], true);
348-
const { created_by, updated_by, dataset_id, api_version } = draftDataset;
348+
const { created_by, updated_by, dataset_id, id } = draftDataset;
349349
const allFields = await tableGenerator.getAllFields(draftDataset, "druid");
350350
const ingestionSpec = tableGenerator.getDruidIngestionSpec(draftDataset, allFields, existingDatasource.datasource_ref);
351351
let draftDatasource = existingDatasource
352352
_.set(draftDatasource, "ingestion_spec", ingestionSpec)
353353
_.set(draftDatasource, "created_by", created_by);
354354
_.set(draftDatasource, "updated_by", updated_by);
355355
_.set(draftDatasource, "type", "druid");
356+
_.set(draftDatasource, "dataset_id", id);
356357
if (_.get(liveDataset, "api_version") === "v1") {
357358
_.set(draftDatasource, "datasource", dataset_id)
358359
}

0 commit comments

Comments
 (0)