Skip to content

Commit

Permalink
Fix for duplicate destinations (#650)
Browse files Browse the repository at this point in the history
  • Loading branch information
edlouth authored Sep 19, 2023
1 parent 83d8765 commit 1ffd010
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions grai-server/app/lineage/graph_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,12 +270,12 @@ def get_graph_result(
OPTIONAL MATCH (table)-[table_edge:TABLE_TO_TABLE]->(destination:Table)
WITH
table,
COLLECT({{
COLLECT(distinct {{
edge_id: table_edge.id,
table_id: destination.id
}}) AS destinations,
column,
collect({{
collect(distinct {{
edge_id: column_edge.id,
column_id: column_destination.id
}}) AS column_destinations
Expand Down Expand Up @@ -396,7 +396,7 @@ def get_with_step_graph_result(
OPTIONAL MATCH (table)-[table_edge:TABLE_TO_TABLE]->(destination:Table)
WITH
table,
COLLECT({{
COLLECT(distinct {{
edge_id: table_edge.id,
table_id: destination.id
}}) AS destinations,
Expand All @@ -412,7 +412,7 @@ def get_with_step_graph_result(
destinations,
table_destinations,
table_sources,
collect({{
collect(distinct {{
id: column.id,
name: column.name,
display_name: column.display_name,
Expand Down

0 comments on commit 1ffd010

Please sign in to comment.