Skip to content

Commit

Permalink
1590 - added new filters for data quality dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladysl committed Feb 7, 2024
1 parent 317378c commit ff272a7
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ public class DataQualityRunsController implements DataQualityRunsApi {
private final DataQualityRunsService service;

@Override
public Mono<ResponseEntity<DataQualityResults>> getDataQualityTestsRuns(final List<Long> namespaceId,
final List<Long> datasourceId,
final List<Long> ownerId,
final List<Long> titleId,
final List<Long> tagId,
final List<Long> deNamespaceId,
final List<Long> deDatasourceId,
final List<Long> deOwnerId,
final List<Long> deTitleId,
final List<Long> deTagId,
public Mono<ResponseEntity<DataQualityResults>> getDataQualityTestsRuns(final List<Long> namespaceIds,
final List<Long> datasourceIds,
final List<Long> ownerIds,
final List<Long> titleIds,
final List<Long> tagIds,
final List<Long> deNamespaceIds,
final List<Long> deDatasourceIds,
final List<Long> deOwnerIds,
final List<Long> deTitleIds,
final List<Long> deTagIds,
final ServerWebExchange exchange) {
return service.getDataQualityTestsRuns(namespaceId, datasourceId, ownerId, titleId, tagId,
deNamespaceId, deDatasourceId, deOwnerId, deTitleId, deTagId)
return service.getDataQualityTestsRuns(namespaceIds, datasourceIds, ownerIds, titleIds, tagIds,
deNamespaceIds, deDatasourceIds, deOwnerIds, deTitleIds, deTagIds)
.map(ResponseEntity::ok);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ public record DataQualityTestFiltersDto(List<Long> namespaceIds,
List<Long> ownerIds,
List<Long> titleIds,
List<Long> tagIds,
List<Long> deNamespaceId,
List<Long> deDatasourceId,
List<Long> deOwnerId,
List<Long> deTitleId,
List<Long> deTagId) {
List<Long> deNamespaceIds,
List<Long> deDatasourceIds,
List<Long> deOwnerIds,
List<Long> deTitleIds,
List<Long> deTagIds) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@
public class DataQualityTestFiltersMapper {
public DataQualityTestFiltersDto mapToDto(final List<Long> namespaceIds, final List<Long> datasourceIds,
final List<Long> ownerIds, final List<Long> titleIds,
final List<Long> tagIds, final List<Long> deNamespaceId,
final List<Long> deDatasourceId, final List<Long> deOwnerId,
final List<Long> deTitleId, final List<Long> deTagId) {
final List<Long> tagIds, final List<Long> deNamespaceIds,
final List<Long> deDatasourceIds, final List<Long> deOwnerIds,
final List<Long> deTitleIds, final List<Long> deTagIds) {
return DataQualityTestFiltersDto.builder()
.namespaceIds(namespaceIds)
.datasourceIds(datasourceIds)
.ownerIds(ownerIds)
.titleIds(titleIds)
.tagIds(tagIds)
.deNamespaceId(deNamespaceId)
.deDatasourceId(deDatasourceId)
.deOwnerId(deOwnerId)
.deTitleId(deTitleId)
.deTagId(deTagId)
.deNamespaceIds(deNamespaceIds)
.deDatasourceIds(deDatasourceIds)
.deOwnerIds(deOwnerIds)
.deTitleIds(deTitleIds)
.deTagIds(deTagIds)
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,8 @@ private Table<Record2<Long, String>> generateDataEntityFiltersCte(final DataQual
SelectJoinStep<Record2<Long, String>> table = DSL.select(DATA_ENTITY.ID, DATA_ENTITY.ODDRN)
.from(DATA_ENTITY);

table = getConditionsForFilters(table, filtersDto.deDatasourceId(), filtersDto.deNamespaceId(),
filtersDto.deOwnerId(), filtersDto.deTitleId(), filtersDto.deTagId());
table = getConditionsForFilters(table, filtersDto.deDatasourceIds(), filtersDto.deNamespaceIds(),
filtersDto.deOwnerIds(), filtersDto.deTitleIds(), filtersDto.deTagIds());

table.where(DATA_ENTITY.TYPE_ID.notIn(DataEntityTypeDto.JOB.getId(), DataEntityTypeDto.JOB_RUN.getId()));

Expand Down Expand Up @@ -329,10 +329,10 @@ private boolean shouldAddFiltersForTest(final DataQualityTestFiltersDto filtersD
}

private boolean shouldAddFiltersForDataEntity(final DataQualityTestFiltersDto filtersDto) {
return CollectionUtils.isNotEmpty(filtersDto.deDatasourceId())
|| CollectionUtils.isNotEmpty(filtersDto.deNamespaceId())
|| CollectionUtils.isNotEmpty(filtersDto.deOwnerId())
|| CollectionUtils.isNotEmpty(filtersDto.deTitleId())
|| CollectionUtils.isNotEmpty(filtersDto.deTagId());
return CollectionUtils.isNotEmpty(filtersDto.deDatasourceIds())
|| CollectionUtils.isNotEmpty(filtersDto.deNamespaceIds())
|| CollectionUtils.isNotEmpty(filtersDto.deOwnerIds())
|| CollectionUtils.isNotEmpty(filtersDto.deTitleIds())
|| CollectionUtils.isNotEmpty(filtersDto.deTagIds());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
public interface DataQualityRunsService {
Mono<DataQualityResults> getDataQualityTestsRuns(final List<Long> namespaceIds, final List<Long> datasourceIds,
final List<Long> ownerIds, final List<Long> titleIds,
final List<Long> tagIds, final List<Long> deNamespaceId,
final List<Long> deDatasourceId, final List<Long> deOwnerId,
final List<Long> deTitleId, final List<Long> deTagId);
final List<Long> tagIds, final List<Long> deNamespaceIds,
final List<Long> deDatasourceIds, final List<Long> deOwnerIds,
final List<Long> deTitleIds, final List<Long> deTagIds);
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ public Mono<DataQualityResults> getDataQualityTestsRuns(final List<Long> namespa
final List<Long> ownerIds,
final List<Long> titleIds,
final List<Long> tagIds,
final List<Long> deNamespaceId,
final List<Long> deDatasourceId,
final List<Long> deOwnerId,
final List<Long> deTitleId,
final List<Long> deTagId) {
final List<Long> deNamespaceIds,
final List<Long> deDatasourceIds,
final List<Long> deOwnerIds,
final List<Long> deTitleIds,
final List<Long> deTagIds) {
final DataQualityTestFiltersDto filtersDto
= dataQualityTestFiltersMapper.mapToDto(namespaceIds, datasourceIds, ownerIds, titleIds, tagIds,
deNamespaceId, deDatasourceId, deOwnerId, deTitleId, deTagId);
deNamespaceIds, deDatasourceIds, deOwnerIds, deTitleIds, deTagIds);
return dataQualityRunsRepository.getLatestDataQualityRunsResults(filtersDto)
.collectList()
.zipWith(dataQualityRunsRepository.getLatestTablesHealth(filtersDto).collectList()
Expand Down
20 changes: 10 additions & 10 deletions odd-platform-specification/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1937,7 +1937,7 @@ paths:
description: Get Data Quality tests runs
operationId: getDataQualityTestsRuns
parameters:
- name: namespaceId
- name: namespaceIds
in: query
required: false
schema:
Expand All @@ -1947,7 +1947,7 @@ paths:
format: int64
style: form
explode: true
- name: datasourceId
- name: datasourceIds
in: query
required: false
schema:
Expand All @@ -1957,7 +1957,7 @@ paths:
format: int64
style: form
explode: true
- name: ownerId
- name: ownerIds
in: query
required: false
schema:
Expand All @@ -1967,7 +1967,7 @@ paths:
format: int64
style: form
explode: true
- name: titleId
- name: titleIds
in: query
required: false
schema:
Expand All @@ -1977,7 +1977,7 @@ paths:
format: int64
style: form
explode: true
- name: tagId
- name: tagIds
in: query
required: false
schema:
Expand All @@ -1987,7 +1987,7 @@ paths:
format: int64
style: form
explode: true
- name: deNamespaceId
- name: deNamespaceIds
in: query
required: false
schema:
Expand All @@ -1997,7 +1997,7 @@ paths:
format: int64
style: form
explode: true
- name: deDatasourceId
- name: deDatasourceIds
in: query
required: false
schema:
Expand All @@ -2007,7 +2007,7 @@ paths:
format: int64
style: form
explode: true
- name: deOwnerId
- name: deOwnerIds
in: query
required: false
schema:
Expand All @@ -2017,7 +2017,7 @@ paths:
format: int64
style: form
explode: true
- name: deTitleId
- name: deTitleIds
in: query
required: false
schema:
Expand All @@ -2027,7 +2027,7 @@ paths:
format: int64
style: form
explode: true
- name: deTagId
- name: deTagIds
in: query
required: false
schema:
Expand Down

0 comments on commit ff272a7

Please sign in to comment.