Skip to content

chdb: rewrite JupySQL guide on the NYC taxi dataset#6508

Open
ShawnChen-Sirius wants to merge 2 commits into
mainfrom
chdb/fix-jupysql-guide
Open

chdb: rewrite JupySQL guide on the NYC taxi dataset#6508
ShawnChen-Sirius wants to merge 2 commits into
mainfrom
chdb/fix-jupysql-guide

Conversation

@ShawnChen-Sirius

Copy link
Copy Markdown

Why

The chDB JupySQL guide can no longer be followed end to end:

  • Its example data came from the JeffSackmann/tennis_atp GitHub repo, which has been removed — every download step in the guide now 404s.
  • The JupySQL link pointed at jupysql.ploomber.io, whose domain no longer resolves (the project itself is alive on GitHub/PyPI).
  • The frontmatter description read “How to install chDB for Bun”, copied from another page.

What

Rewritten around the NYC taxi dataset already hosted for these docs (datasets-documentation S3 bucket): three TSV trip files (~3M rows) plus the taxi zone lookup CSV. The structure and teaching points are unchanged from the original — glob queries over raw files, schema cleanup during import (String→Float64 casts and a borocode→borough transform), a two-table join, saved queries as CTEs, parametrized queries, and a histogram.

The outdated tennis histogram image import is dropped; the JupySQL link now points at the project's GitHub repository.

Verification

Every query and output table in the guide was executed against chdb 4.1.8 on the real downloaded files (3,000,317 trips imported; join and tip results are pasted from actual runs).

🤖 Generated with Claude Code

The guide could no longer be followed end to end:

- The example data came from the JeffSackmann/tennis_atp GitHub repo,
  which has been removed, so every download step 404s.
- The JupySQL link pointed at jupysql.ploomber.io, whose domain no
  longer resolves; it now points at the project's GitHub repository.
- The frontmatter description said 'How to install chDB for Bun',
  copied from another page.

Rewritten around the NYC taxi dataset already hosted for the
ClickHouse docs (datasets-documentation S3 bucket): three TSV trip
files plus the taxi zone lookup CSV. The structure and teaching points
are unchanged — glob queries over raw files, schema cleanup during
import (String-to-Float64 casts and a borocode-to-borough transform),
a two-table join, saved queries as CTEs, parametrized queries, and a
histogram. Every query and output in the guide was run against
chdb 4.1.8 on the real files.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ShawnChen-Sirius ShawnChen-Sirius requested a review from a team as a code owner July 7, 2026 22:53
@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clickhouse-docs Ready Ready Preview, Comment Jul 7, 2026 11:21pm
clickhouse-docs-jp Building Building Preview, Comment Jul 7, 2026 11:21pm
3 Skipped Deployments
Project Deployment Actions Updated (UTC)
clickhouse-docs-ko Ignored Ignored Preview Jul 7, 2026 11:21pm
clickhouse-docs-ru Ignored Ignored Preview Jul 7, 2026 11:21pm
clickhouse-docs-zh Ignored Ignored Preview Jul 7, 2026 11:21pm

Request Review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit feeb028. Configure here.

Comment thread docs/chdb/guides/jupysql.md
Comment thread docs/chdb/guides/jupysql.md
The saved query carries its own ORDER BY, but a CTE does not guarantee
the outer SELECT preserves it. Order both follow-up queries explicitly
so the shown output is what readers actually get.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@dhtclk dhtclk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good, just one small suggestion before approval.

[JupySQL](https://github.com/ploomber/jupysql) is a Python library that lets you run SQL in Jupyter notebooks and the IPython shell.
In this guide, we're going to learn how to query data using chDB and JupySQL.

<div class='vimeo-container'>

@dhtclk dhtclk Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We may want to add an admonition note below this video indicating that it is referencing a stale dataset that no longer exists. I think the video content is still good and legitimate, but I think without a note the user experience is a little confusing if following the guide.

Perhaps something like this:

:::note
The video above follows an earlier version of this guide built on the tennis ATP dataset. The JupySQL and chDB workflow it shows is still accurate, but the written steps below use the New York City taxi dataset instead.
:::

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What if we removed the video here and linked it at the bottom rather? Something like:

## See also {#see-also}
- [Intro to JupySQL with chDB](https://www.youtube.com/watch?v=2wjl3OijCto&source_ve_path=MTc4NDI0)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ah that also works, probably the simpler solution! Your call on which you'd prefer @ShawnChen-Sirius

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants