JupySQL Plugin

raw JSON →
0.4.5 verified Mon Apr 27 auth: no python

JupyterLab extension for JupySQL, providing a graphical interface for SQL queries in notebooks. Current version 0.4.5, released sporadically with minor updates.

pip install jupysql-plugin
error JupyterLab extension 'jupysql_plugin' is not installed
cause Extension not enabled after installation or not built.
fix
Run: jupyter labextension enable jupysql_plugin
error ModuleNotFoundError: No module named 'jupysql_plugin'
cause Package not installed in the Jupyter kernel's Python environment.
fix
Install in the correct environment: pip install jupysql-plugin
error Error: This extension does not support JupyterLab 4
cause JupyterLab 4 is not compatible.
fix
Downgrade to JupyterLab 3: conda install jupyterlab=3
gotcha Plugin must be installed in the same environment as JupyterLab. Installing via pip outside the active Jupyter environment will not work.
fix Install jupysql-plugin in the JupyterLab kernel's Python environment.
gotcha JupyterLab 4 is not supported; only JupyterLab 3.x works.
fix Use JupyterLab 3 or downgrade: conda install jupyterlab=3
deprecated The plugin's SQL editor UI may break with newer versions of JupySQL (>=0.10). Compatibility is not guaranteed.
fix Keep jupysql at version <0.10 or check for plugin updates.
breaking Plugin version 0.3.0 changed the extension name from 'jupysql-plugin' to 'jupysql_plugin' in some contexts. Old configurations may not work.
fix Re-enable the extension: jupyter labextension enable jupysql_plugin
conda install -c conda-forge jupysql-plugin

After installation, reload the page, specify connection string, and run a query.

import jupysql_plugin
%load_ext sql
import os
db_url = os.environ.get('DATABASE_URL', 'sqlite://')
%sql $db_url
%sql SELECT 1 as test;