Announcing the new ClickHouse SQL Playground
sql.clickhouse.com is a new public SQL playground offering over 35 datasets (60 TB) and 220 example queries, with syntax highlighting, autocomplete, query parameters, basic charting via Apache ECharts and shareable links. It is a NextJS/React single-page app talking directly to ClickHouse's HTTP interface. Read-only credentials are exposed safely by combining RBAC, query complexity limits (10 billion rows read, 1000 rows returned) and per-IP quotas of 60 queries per hour. The service runs on a fixed 3-node, 30-vCPU ClickHouse Cloud cluster backed by object storage. Live query progress polls system.processes every 100ms by query ID under a separate monitor user, avoiding HTTP progress headers that the browser fetch API can't read.
Related posts
- Building single page applications with ClickHouse
ClickHouse mediumAdept
ClickHouse can serve as a direct browser-queried backend for single page applications, removing the API server layer for demos, prototypes and analytics UIs. Doing this safely depends on HTTPS-only access, CORS configuration, parameterized queries to prevent SQL injection, read-only users with role-based access control, query complexity limits and quotas to stop rogue clients from overwhelming the database. Practical guidance covers choosing JSON output formats (streamable EachRow variants for large results, Arrow for high-volume rendering), reading progress and summary headers, the `wait_end_of_query` tradeoff, handling mid-stream errors returned with HTTP 200, and preferring the official @clickhouse/client-web library. ClickHouse Cloud Query Endpoints are suggested for teams wanting an API layer instead.
- Adding Analytics to an Application in under 10 minutes with ClickHouse Cloud Query Endpoints
ClickHouse mediumAdept
ClickHouse Cloud's beta API endpoints turn a saved parameterized SQL query into a secure HTTP POST endpoint, moving SQL out of application code so queries can change without redeploying. The walkthrough adds GitHub stars, issues, forks and PR counts to the ClickPy PyPI dashboard. A query resolves each package's GitHub repo ID from PyPI metadata and aggregates the GitHub events table with uniqExactIf. The endpoint is bound to a read-only role with IP-keyed quotas and optional CORS, then called from a Next.js/React component via a generic fetch helper, returning any of ClickHouse's output formats such as JSONEachRow.
- ClickHouse Fiddle — A SQL Playground for ClickHouse
ClickHouse mediumAdept
ClickHouse Fiddle is an open-source SQL playground that runs arbitrary queries, including DDL and writes, against any ClickHouse version and produces a shareable link to the results. Each request starts an ephemeral Docker container on a runner machine. A custom lightweight coordinator load-balances across runners, preferring those that already have the image pulled, then kills the container after execution and stores results. This trades some startup latency (p90 around 2 seconds on hot versions) for far lower resource use than always-on instances, and the custom coordinator was chosen over Kubernetes for simplicity and speed.
- ClickHouse Newsletter December 2022: Project all your troubles away
ClickHouse mediumAdept
ClickHouse Cloud is now generally available, adding SOC 2 Type II compliance, SLAs, AWS Marketplace availability, a Development tier from about $50/month, a SQL console, and support for PostgreSQL/MySQL engines, dictionaries and SQL UDFs. ClickHouse 22.11 brings composite time intervals, recursive `**` globs for filesystem and S3 paths, keeper retries during inserts (`insert_keeper_max_retries`), Hudi and DeltaLake engines, readonly S3 disks, and Object(JSON) nested in other types. A worked projection example on a metrics table cuts a latest-value-per-metric query from 0.9s scanning 220M rows to 7ms scanning 255 rows, with no change to the query or table schema. The issue also lists upcoming workshops and meetups and a holiday reading list.
- clickhousectl v0.2.0: Postgres, ClickPipes and more
ClickHouse mediumAdept
clickhousectl v0.2.0 adds Postgres management, both local (Docker-backed, keyed on name and major version 16–18) and as ClickHouse Cloud managed Postgres. It also adds ClickPipes commands for Kafka, Kinesis, object storage, CDC from Postgres/MySQL/MongoDB and BigQuery snapshots, plus SQL over HTTP through Query Endpoints so no local ClickHouse binary is needed. Query Endpoints are locked to a per-service API key whose only grant is a sql_console_admin binding, so a leaked key reaches one service only. Other changes include Markdown-style table output that uses fewer tokens for agents, a --debug flag for credential resolution, and a standalone typed async Rust crate, clickhouse-cloud-api.