From aa492ffda707e0662feeb98a0e4827481af90801 Mon Sep 17 00:00:00 2001 From: 07Himank <112613760+07Himank@users.noreply.github.com> Date: Tue, 25 Apr 2023 10:00:49 +0530 Subject: [PATCH] Lineage task new (#11231) * working on pipeline lineage fix * solved issue for lineage not visible when added from pipeline to table --------- Co-authored-by: Himank Mehta --- .../org/openmetadata/service/jdbi3/CollectionDAO.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/CollectionDAO.java b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/CollectionDAO.java index de4e212113a..4084184f711 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/CollectionDAO.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/CollectionDAO.java @@ -665,13 +665,13 @@ public interface CollectionDAO { @ConnectionAwareSqlQuery( value = "SELECT toId, toEntity, json FROM entity_relationship " - + "WHERE JSON_UNQUOTE(JSON_EXTRACT(json, '$.pipeline.id')) =:fromId AND relation = :relation " + + "WHERE JSON_UNQUOTE(JSON_EXTRACT(json, '$.pipeline.id')) =:fromId OR fromId = :fromId AND relation = :relation " + "ORDER BY toId", connectionType = MYSQL) @ConnectionAwareSqlQuery( value = "SELECT toId, toEntity, json FROM entity_relationship " - + "WHERE json->'pipeline'->>'id' =:fromId AND relation = :relation " + + "WHERE json->'pipeline'->>'id' =:fromId OR fromId = :fromId AND relation = :relation " + "ORDER BY toId", connectionType = POSTGRES) @RegisterRowMapper(ToRelationshipMapper.class) @@ -702,13 +702,13 @@ public interface CollectionDAO { @ConnectionAwareSqlQuery( value = "SELECT fromId, fromEntity, json FROM entity_relationship " - + "WHERE JSON_UNQUOTE(JSON_EXTRACT(json, '$.pipeline.id')) = :toId AND relation = :relation " + + "WHERE JSON_UNQUOTE(JSON_EXTRACT(json, '$.pipeline.id')) = :toId OR toId = :toId AND relation = :relation " + "ORDER BY fromId", connectionType = MYSQL) @ConnectionAwareSqlQuery( value = "SELECT fromId, fromEntity, json FROM entity_relationship " - + "WHERE json->'pipeline'->>'id' = :toId AND relation = :relation " + + "WHERE json->'pipeline'->>'id' = :toId OR toId = :toId AND relation = :relation " + "ORDER BY fromId", connectionType = POSTGRES) @RegisterRowMapper(FromRelationshipMapper.class)