Add Jupyter JupySQL tutorial for querying Pinot - #19374
Open
codewithsruthi wants to merge 2 commits into
Open
Conversation
Data scientists need a local notebook path for SQL EDA and plots against the batch quickstart, not only the DB-API snippets on the Python client page. Co-authored-by: Cursor <cursoragent@cursor.com>
Jupyter does not render plt.show() without the inline backend, so the plotting section would look empty in a normal notebook session. Co-authored-by: Cursor <cursoragent@cursor.com>
codewithsruthi
marked this pull request as draft
August 26, 2026 22:36
1 task
codewithsruthi
marked this pull request as ready for review
August 27, 2026 21:15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
Adds a first-party Jupyter tutorial so Python / data-science users can query Apache Pinot from a notebook with JupySQL and pinotdb.
closes: #10160
That issue asked for three things that did not exist in the repo or the GitBook Python client page:
The existing Python client docs only show DB-API / SQLAlchemy snippets. Dash / Streamlit / Redash tutorials exist; there was no Jupyter + JupySQL walkthrough.
Files
All new files are under
contrib/jupyter-jupysql/so GitHub Actionspaths-ignore: contrib/**does not start the Java unit / integration / quickstart matrix.contrib/jupyter-jupysql/README.md./build/bin/quick-start-batch.shor Docker), install deps, run or headlessly execute the notebookcontrib/jupyter-jupysql/requirements.txtpinotdb,jupysql,pandas,matplotlib,jupyter,sqlalchemy,ipykernel,nbconvertcontrib/jupyter-jupysql/pinot_jupysql_eda.ipynbbaseballStatsbatch-quickstart tableNotebook contents
%sql engine(JupySQL’s reliable path for non-standard URLs):pinot://localhost:8000/query/sql?controller=http://localhost:9000/connect_args={"use_multistage_engine": "true"}so JupySQL%sqlplotCTEs are accepted by PinotSELECT … LIMIT,GROUP BY/ORDER BYonplayerName,teamID,yearID,SUM(runs)%sqlplot%matplotlib inlineso figures actually render in Jupyter (plt.show()is silent without it)Port: batch and Docker quickstarts expose the broker SQL API on 8000 (controller UI 9000). Older python.md snippets used 8099; the README calls that out.
Companion docs PR
GitBook lives in pinot-contrib/pinot-docs, not this repo:
pinot-contrib/pinot-docs#1010
That PR adds
tutorials/getting-started/jupyter-jupysql.mdand links it from the tutorials TOC and the Python client page.Testing
No new Java tests. CI for this repo ignores
contrib/**, so unit / integration / quickstart workflows are not expected to run (and “no checks” on this branch is expected).Manual verification against a local batch quickstart (
./build/bin/quick-start-batch.sh):GET /healthon:9000→OKPOST /query/sqlon:8000:SELECT count(*) FROM baseballStats→ 97889 rows, no exceptionsjupyter nbconvert --execute pinot_jupysql_eda.ipynb: 7 code cells, 0 errors, 2 PNG plotsTo reproduce:
Was generative AI tooling used to co-author this PR?
Generated-by: Cursor Grok 4.6