Skip to content

Commit

Permalink
1590 - added new filters for data quality dashboard (#1604)
Browse files Browse the repository at this point in the history
Co-authored-by: Anatolii Yemets <[email protected]>
Co-authored-by: ayemets-corcentric <[email protected]>
  • Loading branch information
3 people authored Feb 14, 2024
1 parent 4d523dd commit 634147a
Show file tree
Hide file tree
Showing 37 changed files with 1,451 additions and 244 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.opendatadiscovery.oddplatform.controller;

import java.util.List;
import lombok.RequiredArgsConstructor;
import org.opendatadiscovery.oddplatform.api.contract.api.DataQualityRunsApi;
import org.opendatadiscovery.oddplatform.api.contract.model.DataQualityResults;
Expand All @@ -15,9 +16,19 @@ public class DataQualityRunsController implements DataQualityRunsApi {
private final DataQualityRunsService service;

@Override
public Mono<ResponseEntity<DataQualityResults>> getDataQualityTestsRuns(
final ServerWebExchange exchange) {
return service.getDataQualityTestsRuns()
.map(ResponseEntity::ok);
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(namespaceIds, datasourceIds, ownerIds, titleIds, tagIds,
deNamespaceIds, deDatasourceIds, deOwnerIds, deTitleIds, deTagIds)
.map(ResponseEntity::ok);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package org.opendatadiscovery.oddplatform.dto;

import java.util.List;
import lombok.Builder;

@Builder
public record DataQualityTestFiltersDto(List<Long> namespaceIds,
List<Long> datasourceIds,
List<Long> ownerIds,
List<Long> titleIds,
List<Long> tagIds,
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
@@ -0,0 +1,27 @@
package org.opendatadiscovery.oddplatform.mapper;

import java.util.List;
import org.opendatadiscovery.oddplatform.dto.DataQualityTestFiltersDto;
import org.springframework.stereotype.Component;

@Component
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> 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)
.deNamespaceIds(deNamespaceIds)
.deDatasourceIds(deDatasourceIds)
.deOwnerIds(deOwnerIds)
.deTitleIds(deTitleIds)
.deTagIds(deTagIds)
.build();
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.opendatadiscovery.oddplatform.repository.reactive;

import java.io.Serializable;
import org.opendatadiscovery.oddplatform.dto.DataQualityTestFiltersDto;
import reactor.core.publisher.Flux;

public interface ReactiveDataQualityRunsRepository {
Expand All @@ -16,9 +17,9 @@ record MonitoredtablesRecord(Integer count, String status) implements
Serializable {
}

Flux<DataQualityRunsRecord> getLatestDataQualityRunsResults();
Flux<DataQualityRunsRecord> getLatestDataQualityRunsResults(final DataQualityTestFiltersDto filtersDto);

Flux<TableHealthRecord> getLatestTablesHealth();
Flux<TableHealthRecord> getLatestTablesHealth(final DataQualityTestFiltersDto filtersDto);

Flux<MonitoredtablesRecord> getMonitoredTables();
Flux<MonitoredtablesRecord> getMonitoredTables(final DataQualityTestFiltersDto filtersDto);
}
Loading

0 comments on commit 634147a

Please sign in to comment.