Skip to content
New issue

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

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

Already on GitHub? # to your account

UI extension - allowing users to see existing table/columns in a connected db #22

Closed
idomic opened this issue Jan 10, 2023 · 4 comments · Fixed by ploomber/jupysql#95
Closed
Assignees

Comments

@idomic
Copy link
Contributor

idomic commented Jan 10, 2023

This will probably be a widget to allow users view without querying the existing data model in the db, and existing columns.
We probably need more feedback here before building it.

@edublancas
Copy link
Contributor

A few thoughts:

The most challenging part here is communicating with the JupyterLab front end. We tried doing something similar in Ploomber a while ago: we wanted to show an alert when a specific event in the Python kernel happened, but we needed help finding an easy solution. It's certainly possible since the visual debugger does precisely that, but I bet it'll require some heavy work.

As a first version, we can create an interactive HTML that allows users to explore the tables/columns. Example:

%sqlreport 

# or a Python API?
from SQL import report
report()

This could generate an HTML that users can download or interact with directly in the cell. See a list of tables, columns for each table, and maybe even get some summary statistics (note that this overlaps with ploomber/jupysql#66)

Since each DB implements a different API for listing tables/columns, we can leverage SQLAlchemy to use a single API compatible with many databases.

@idomic
Copy link
Contributor Author

idomic commented Jan 31, 2023

Reopening as not done

@idomic idomic reopened this Jan 31, 2023
@psychemedia
Copy link

Some years ago, I explored various magics for visualising schemas from Postgres database connections; for example: https://github.com/innovationOUtside/ipython_magic_sqlalchemy_schemadisplay which we still use in a course today (the visualisations are a bit ropey, but useful as quick sketches). The dependencies may be quite heavy though...

image

@edublancas edublancas transferred this issue from ploomber/jupysql May 30, 2023
@edublancas
Copy link
Contributor

moved this to jupysql-plugin

@edublancas edublancas closed this as not planned Won't fix, can't repro, duplicate, stale Jul 20, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants