Skip to content

Update visualization input to streamline connection to extraction output #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 4, 2025

Conversation

cmcouto-silva
Copy link
Member

As described in issue #13, the current implementation doesn't connect seamlessly with SQLDeps extraction.

This PR solves this issue so that users can generate interactive graphs with ease:

from sqldeps.llm_parsers import create_extractor
from sqldeps.visualization import visualize_sql_dependencies

# Create an interactive network graph from multiple SQL files
extractor = create_extractor()
sql_profiles = extractor.extract_from_folder("path/to/folder", recursive=False)

# Generate an interactive visualization (saving output to an HTML file)
figure = visualize_sql_dependencies(sql_profiles, output_path="dependencies.html")

# Show figure on IDE
figure.show()

@cmcouto-silva cmcouto-silva self-assigned this Apr 3, 2025
@cmcouto-silva cmcouto-silva added the enhancement New feature or request label Apr 3, 2025
@@ -25,15 +26,14 @@ def visualize_sql_dependencies( # noqa: C901
show_file_text: bool = True,
show_table_text: bool = False,
text_font_size: int = 10,
show_text_buttons: bool = False,
show_layout_buttons: bool = False,
show_text_buttons: bool = True,
Copy link
Member Author

@cmcouto-silva cmcouto-silva Apr 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Show buttons by default, since it's a pretty cool feature for end users :)

@cmcouto-silva cmcouto-silva merged commit 88d1da9 into main Apr 4, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant