Practice Databricks SQL on a serverless SQL warehouse: Delta tables, time travel, and a small medallion pipeline.
| Field | Detail |
|---|---|
| Repository | databricks-sql-lab |
| Primary language | Mixed / documentation |
| Topics | analytics, database, database-labs, databricks, delta-lake, devarent, lab, lakehouse, sql |
| License | MIT |
| Branch | main |
| Maintainer | @devarent |
databricks-sql-lab is a hands-on repository focused on: Practice Databricks SQL on a serverless SQL warehouse: Delta tables, time travel, and a small medallion pipeline.. Primary language: Mixed / documentation. Topics: analytics, database, database-labs, databricks, delta-lake, devarent, lab, lakehouse, sql. The README below documents the project; use the table above for a quick overview.
🇮🇸 Iceland · 🇳🇿 New Zealand · 🇨🇭 Switzerland · 🇸🇮 Slovenia · 🇮🇪 Ireland · 🇦🇹 Austria · 🇵🇹 Portugal · 🇸🇬 Singapore · 🇫🇮 Finland
Practice Databricks SQL on a serverless SQL warehouse: Delta tables, time travel, and a small medallion pipeline.
Practice Databricks SQL on a serverless SQL warehouse: Delta tables, time travel, and a small medallion pipeline.
Databricks SQL is the warehouse interface on top of the lakehouse. This lab is cloud-based because there is no official local Databricks runtime. It walks through a free workspace, a serverless SQL warehouse, Delta tables, time travel, and a bronze-to-gold query chain.
- Create a free Databricks workspace (Free Edition or a trial) and open the SQL editor.
- Create or start a serverless SQL warehouse and note its HTTP path.
- Run
examples/01_setup.sqlto create thelabschema and a Delta table. - Run
examples/02_queries.sqlto inspect the table history and query it. - Run
examples/03_medallion.sqlto build a small bronze-to-gold chain. - Optional: connect DBeaver with the JDBC URL and a PAT, never commit the token.
| Field | Value |
|---|---|
| Workspace | https://<workspace>.cloud.databricks.com |
| SQL warehouse | Serverless or Pro; copy the HTTP path |
| JDBC URL | jdbc:databricks://<workspace-host>:443/default;transportMode=http;ssl=1;httpPath=/sql/1.0/warehouses/<warehouse-id>;AuthMech=3;UID=token;PWD=<PAT> |
| Auth | Personal access token (PAT) or OAuth |
| CLI | databricks sql --warehouse <warehouse-id> |
| File | What it shows |
|---|---|
examples/01_setup.sql |
Schema, Delta table, and seed rows. |
examples/02_queries.sql |
Aggregation, table history, and time travel. |
examples/03_medallion.sql |
A tiny bronze-to-gold chain with MERGE. |
- Add a
userstable and join it toeventsto count events per signup source. - Use
DESCRIBE HISTORYafter anUPDATEand query the previous version. - Create a view that exposes only purchase events, then query it from a dashboard.
- Connect DBeaver using the JDBC URL and run the same queries outside the SQL editor.
- Databricks SQL has no official local runtime; this lab needs a workspace (Free Edition is enough for the exercises).
- Never commit a personal access token. Use a secret scope or environment variable.
- Delta time travel and
OPTIMIZEdepend on the workspace edition and table retention settings. - Costs: serverless SQL warehouses bill per second while running. Stop the warehouse when you finish.
This lab already runs in the provider's cloud. To use it from another country safely:
- Keep the account behind MFA and restrict network access to your IP or VPN where the provider allows it.
- Use a dedicated lab user with the minimum privileges; never reuse personal credentials.
- Store tokens and passwords in a secret manager or environment variables, never in the repository.
- Stop or delete the warehouse, cluster, or VM when you finish to control cost.
The shared checklist and provider map are in REMOTE-ACCESS.md.
Part of the database-labs collection: 26 database engines, one index.
MIT (c) 2026 Arya Fatthurahman. See LICENSE.
Full Tech Stack Wall
Connection names shown in the DBX sidebar - decorative reference badges.