Skip to content

Commit

Permalink
feat: #OBS-I321 : Removed volume_by_days from request schema
Browse files Browse the repository at this point in the history
  • Loading branch information
yashashkumar committed Jan 15, 2025
1 parent 47f053e commit 4a92961
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@
},
"minItems": 1
},
"volume_by_days": {
"type": "integer",
"minimum": 1
},
"query_time_period":{
"type": "integer",
"minimum": 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const datasetMetrics = async (req: Request, res: Response) => {
const dataset_id = _.get(req, "body.request.dataset_id");
const timePeriod = _.get(req, "body.request.query_time_period") || config?.data_observability?.default_query_time_period;

const { category, volume_by_days = 10 }: any = req.body.request;
const { category }: any = req.body.request;
const defaultThreshold = (typeof config?.data_observability?.default_freshness_threshold === 'number' ? config?.data_observability?.default_freshness_threshold : 5) * 60 * 1000; // 5 minutes in milliseconds
const dateFormat = 'YYYY-MM-DDTHH:mm:ss';
const endDate = dayjs().add(1, 'day').format(dateFormat);
Expand Down Expand Up @@ -48,7 +48,7 @@ const datasetMetrics = async (req: Request, res: Response) => {
}

if (!category || category.includes("data_volume")) {
const dataVolumeResult = await getDataVolume(dataset_id, volume_by_days, dateFormat);
const dataVolumeResult = await getDataVolume(dataset_id, timePeriod, dateFormat);
results.push(dataVolumeResult);
}

Expand Down

0 comments on commit 4a92961

Please sign in to comment.