Skip to content

Commit

Permalink
update ingest according to opendatadiscovery-specification PR - #76 (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladysl committed Feb 16, 2024
1 parent 0f42859 commit ff8f4ba
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ spring-starter-cloud = '3.1.0'
spring-starter-bootstrap = '3.1.0'
reactor-extra = '3.5.1'
micrometer-registry-prometheus = '1.9.0'
ingestion-contract-server = '0.1.38'
ingestion-contract-server = '0.1.39'
oddrn-generator-java = '0.1.21'
odd-integration-manifests = '0.0.6'
apache-collections = '4.4'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
import static org.opendatadiscovery.oddplatform.dto.DataEntityTypeDto.DASHBOARD;
import static org.opendatadiscovery.oddplatform.dto.DataEntityTypeDto.DATABASE_SERVICE;
import static org.opendatadiscovery.oddplatform.dto.DataEntityTypeDto.DOMAIN;
import static org.opendatadiscovery.oddplatform.dto.DataEntityTypeDto.ENTITY_RELATIONSHIP;
import static org.opendatadiscovery.oddplatform.dto.DataEntityTypeDto.FEATURE_GROUP;
import static org.opendatadiscovery.oddplatform.dto.DataEntityTypeDto.FILE;
import static org.opendatadiscovery.oddplatform.dto.DataEntityTypeDto.GRAPH_NODE;
import static org.opendatadiscovery.oddplatform.dto.DataEntityTypeDto.GRAPH_RELATIONSHIP;
import static org.opendatadiscovery.oddplatform.dto.DataEntityTypeDto.JOB;
import static org.opendatadiscovery.oddplatform.dto.DataEntityTypeDto.JOB_RUN;
import static org.opendatadiscovery.oddplatform.dto.DataEntityTypeDto.KAFKA_SERVICE;
Expand All @@ -32,7 +34,6 @@
import static org.opendatadiscovery.oddplatform.dto.DataEntityTypeDto.ML_MODEL_ARTIFACT;
import static org.opendatadiscovery.oddplatform.dto.DataEntityTypeDto.ML_MODEL_INSTANCE;
import static org.opendatadiscovery.oddplatform.dto.DataEntityTypeDto.ML_MODEL_TRAINING;
import static org.opendatadiscovery.oddplatform.dto.DataEntityTypeDto.RELATIONSHIP;
import static org.opendatadiscovery.oddplatform.dto.DataEntityTypeDto.TABLE;
import static org.opendatadiscovery.oddplatform.dto.DataEntityTypeDto.VECTOR_STORE;
import static org.opendatadiscovery.oddplatform.dto.DataEntityTypeDto.VIEW;
Expand All @@ -47,7 +48,7 @@ public enum DataEntityClassDto {
DATA_CONSUMER(6, Set.of(ML_MODEL_ARTIFACT, DASHBOARD)),
DATA_INPUT(7, API_CALL),
DATA_ENTITY_GROUP(8, Set.of(ML_EXPERIMENT, DAG, DATABASE_SERVICE, API_SERVICE, KAFKA_SERVICE, DOMAIN)),
DATA_RELATIONSHIP(9, RELATIONSHIP);
DATA_RELATIONSHIP(9, Set.of(ENTITY_RELATIONSHIP, GRAPH_RELATIONSHIP));

private static final Map<Integer, DataEntityClassDto> MAP = Arrays.stream(DataEntityClassDto.values())
.collect(Collectors.toMap(DataEntityClassDto::getId, identity()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ public enum DataEntityTypeDto {
DOMAIN(22),
VECTOR_STORE(23),
LOOKUP_TABLE(24),
RELATIONSHIP(25);
ENTITY_RELATIONSHIP(25),
GRAPH_RELATIONSHIP(26);

private static final Map<Integer, DataEntityTypeDto> MAP = Arrays
.stream(DataEntityTypeDto.values())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import org.jooq.Table;
import org.jooq.impl.DSL;
import org.opendatadiscovery.oddplatform.api.contract.model.RelationshipsType;
import org.opendatadiscovery.oddplatform.dto.DataEntityTypeDto;
import org.opendatadiscovery.oddplatform.dto.RelationshipDto;
import org.opendatadiscovery.oddplatform.model.tables.pojos.DataEntityPojo;
import org.opendatadiscovery.oddplatform.model.tables.pojos.RelationshipsPojo;
Expand All @@ -29,6 +28,7 @@
import org.springframework.stereotype.Repository;
import reactor.core.publisher.Mono;

import static org.opendatadiscovery.oddplatform.dto.DataEntityClassDto.DATA_RELATIONSHIP;
import static org.opendatadiscovery.oddplatform.model.Tables.DATA_ENTITY;
import static org.opendatadiscovery.oddplatform.model.Tables.RELATIONSHIPS;

Expand Down Expand Up @@ -57,7 +57,7 @@ public Mono<Page<RelationshipDto>> getRelationships(final Integer page, final In
conditionList.add(DATA_ENTITY.EXTERNAL_NAME.containsIgnoreCase(inputQuery));
}

conditionList.add(DATA_ENTITY.TYPE_ID.eq(DataEntityTypeDto.RELATIONSHIP.getId()));
conditionList.add(DATA_ENTITY.ENTITY_CLASS_IDS.eq(new Integer[] {DATA_RELATIONSHIP.getId()}));

final Select<DataEntityRecord> homogeneousQuery = DSL.selectFrom(DATA_ENTITY)
.where(conditionList);
Expand Down
3 changes: 2 additions & 1 deletion odd-platform-specification/components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,8 @@ components:
- DOMAIN
- VECTOR_STORE
- LOOKUP_TABLE
- RELATIONSHIP
- ENTITY_RELATIONSHIP
- GRAPH_RELATIONSHIP
required:
- id
- name
Expand Down

0 comments on commit ff8f4ba

Please sign in to comment.