From 0a0611043f5125aa94e280f3f667fa3d3684b5a7 Mon Sep 17 00:00:00 2001 From: "Daniel R. Little" Date: Thu, 26 Sep 2024 00:11:33 -0400 Subject: [PATCH] Fixing the rendering of the graph to not use schema when produing relationships --- paracelsus/transformers/dot.py | 2 +- paracelsus/transformers/mermaid.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/paracelsus/transformers/dot.py b/paracelsus/transformers/dot.py index 1b55c92..10d5c8b 100644 --- a/paracelsus/transformers/dot.py +++ b/paracelsus/transformers/dot.py @@ -40,7 +40,7 @@ def __init__(self, metaclass: MetaData, column_sort: str) -> None: ) continue - edge = pydot.Edge(left_table, table.name) + edge = pydot.Edge(left_table.split('.')[-1], table.name) edge.set_label(column.name) edge.set_dir("both") diff --git a/paracelsus/transformers/mermaid.py b/paracelsus/transformers/mermaid.py index 4650797..2aaacc0 100644 --- a/paracelsus/transformers/mermaid.py +++ b/paracelsus/transformers/mermaid.py @@ -85,7 +85,7 @@ def _relationships(self, column: Column) -> str: else: left_operand = "}o" - output += f" {left_table} {left_operand}--{right_operand} {right_table} : {column_name}\n" + output += f" {left_table.split('.')[-1]} {left_operand}--{right_operand} {right_table} : {column_name}\n" return output def __str__(self) -> str: