From 3a85df7a1576aeddc0197f5182a8bff5c58e4c00 Mon Sep 17 00:00:00 2001 From: JeraldJF Date: Tue, 18 Jun 2024 12:58:06 +0530 Subject: [PATCH] Sanketika-Obsrv/issue-tracker#OBS-143: changes in generating updated schema --- api-service/src/v2/services/DatasourceService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-service/src/v2/services/DatasourceService.ts b/api-service/src/v2/services/DatasourceService.ts index bc9e7cf8..96c8f294 100644 --- a/api-service/src/v2/services/DatasourceService.ts +++ b/api-service/src/v2/services/DatasourceService.ts @@ -265,7 +265,7 @@ const processDenormConfigurations = async (item: any) => { const denormFieldsData: any = []; const redis_db = _.get(item, "redis_db"); const denorm_out_field = _.get(item, "denorm_out_field"); - const dataset: any = await Dataset.findOne({ where: { "dataset_config.redis_db": redis_db }, raw: true }) || [] + const dataset: any = await Dataset.findOne({ where: { "dataset_config": { "redis_db": redis_db } }, raw: true }) || [] const transformations = _.size(dataset) ? await DatasetTransformations.findAll({ where: { status: DatasetStatus.Live, dataset_id: _.get(dataset, "dataset_id") }, raw: true }) : [] let schema = flattenSchema(_.get(dataset, "data_schema"), denorm_out_field, true); schema = updateDenormDerived(schema, _.get(transformations, "data.result"), denorm_out_field,);