A Jupyter Kernel for SQLite
blog.jupyter.org
blog.jupyter.org
Which seems to me to be farther along in providing advanced querying/faceting/visualization/sharing capabilities on top of sqlite.
(I love jupyter, and this kernel seems neat; not trying to throw stones at anybody, just to link a project in a similar domain)
I guess I could let it spot when there are less than the page-size of results, but then I'd need to be confident that the JavaScript sorting algorithm exactly matches the underlying SQLite sorting algorithm - taking into account character sets and custom collations and suchlike.
I've been deliberately avoiding adding any JavaScript to core Datasette almost to make a point: you don't need it. HTML pages load faster than so-called "modern" SPA monstrosities. They work really well. They don't require a bunch of extra steps to avoid breaking the back button etc.
But... Datasette provides a JSON API for everything, and supports plugins. There's nothing to stop someone who really wants no-page-reload query execution from implementing it as a plugin.
I myself have built JavaScript plugins for things like bar charts and line charts ( https://github.com/simonw/datasette-vega ) and map visualizations ( https://github.com/simonw/datasette-cluster-map )
So yeah, my personal bias here is that building websites like we did in 1997 is deeply undervalued.
At least with the server being on the internet and the example setup I disagree that the current way is faster or even near a modern webui
"Sorting results of the previous query, click 'Run SQL' button again to query with ${column_name} as the ORDER BY column"
and a "got it" hyperlink to be stored in your session state store of choice upon first click on a column header would probably make it clear.
I find that data/UI tools that only sort the visible results, and not re-populate the paged view of the data, extremely counter-intuitive.
Even old libraries like ExtJS supported easy re-querying the server upon the column sorting event - though it has to be said, many lazy implementers didn't use this feature.
I think the SQLite kernel for Jupyter has a nice foreseeable future with graph visualizations for the query results and the whole integration with conda, mamba and pip environments, though.
I watched a video on that site from the creator, and after trivial installs of datasette and csvs-to-sqlite, I was exploring and facetting my data like never before.
I used to waste some much time generating static report summaries of my data, and now its just 2 steps away: - bundle csvs into a db - datasette it - win
What would be useful is for the kernel of your language of choice to provide a magic for sqlite and return results of queries in language-native data structures.
Something like this: https://pypi.org/project/ipython-sql/
https://orgmode.org/worg/org-contrib/babel/intro.html#meta-p...
[1] https://nbviewer.jupyter.org/github/twosigma/beakerx/blob/ma...
Congrats to the Jupyter team on this!
I realise the difference between the kernels altogether, but how is one better than the other?
Microsoft got it right with Azure Data Studio.
I've also experienced instability issues, it needs that VS Code level polish.
no pip install anything just import sqlite
https://docs.python.org/3.7/library/sqlite3.html
But I will be trying the Jupyter kernel in the article
There's also pandasql[1] which is based on SQLite. We use this behind the scenes at SeekWell[2] to power cross database / cross source joins.
0 - https://pandas.pydata.org/pandas-docs/stable/reference/api/p...
A lot of the time when I need to work with a bunch of data I'll fire up the SQLite CLI, snarf the data with the built-in CSV import commands, and do whatever queries I wanna do. This looks like it can provide a nicer UI around that workflow, and I'm all for it.
Datasette looks interesting for this, too; I'll have to give that a look.
Was adding basic online chart capabilities to our SQLite publishing website a few weeks ago (eg:
https://dbhub.io/vis/justinclift/Marine%20Litter%20Survey%20... )
But if people could do Jupyter notebooks and visualise them like this too, that could be useful.
Hmmm, should probably set up some kind of survey on our website to ask... :)