Skip to content

Commit

Permalink
fix: make draw function in LineageRunner use self._dialect
Browse files Browse the repository at this point in the history
  • Loading branch information
reata committed Dec 31, 2023
1 parent 1c716ec commit f287735
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion sqllineage/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def main(args=None) -> None:
silent_mode=args.silent_mode,
)
if args.graph_visualization:
runner.draw(args.dialect)
runner.draw()
elif args.level == LineageLevel.COLUMN:
runner.print_column_lineage()
else:
Expand Down
3 changes: 1 addition & 2 deletions sqllineage/core/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ def analyze(
) -> StatementLineageHolder:
"""
to analyze single statement sql and store the result into
:class:`sqllineage.core.holders.StatementLineageHolder`
:param sql: single-statement SQL string to be processed
:param metadata_provider: :class:`sqllineage.core.metadata_provider.MetaDataProvider` provides metadata on
tables to help lineage analyzing
:return: :class:`sqllineage.core.holders.StatementLineageHolder`
"""
4 changes: 2 additions & 2 deletions sqllineage/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,15 @@ def to_cytoscape(self, level=LineageLevel.TABLE) -> List[Dict[str, Dict[str, str
else:
return to_cytoscape(self._sql_holder.table_lineage_graph)

def draw(self, dialect: str) -> None:
def draw(self) -> None:
"""
to draw the lineage directed graph
"""
draw_options = self._draw_options
if draw_options.get("f") is None:
draw_options.pop("f", None)
draw_options["e"] = self._sql
draw_options["dialect"] = dialect
draw_options["dialect"] = self._dialect
return draw_lineage_graph(**draw_options)

@lazy_method
Expand Down

0 comments on commit f287735

Please sign in to comment.