Skip to content

About

Practice Databricks SQL on a serverless SQL warehouse: Delta tables, time travel, and a small medallion pipeline.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

databricks-sql-lab

Practice Databricks SQL on a serverless SQL warehouse: Delta tables, time travel, and a small medallion pipeline.

At a glance

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

Overview

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.

Global references

🇮🇸 Iceland · 🇳🇿 New Zealand · 🇨🇭 Switzerland · 🇸🇮 Slovenia · 🇮🇪 Ireland · 🇦🇹 Austria · 🇵🇹 Portugal · 🇸🇬 Singapore · 🇫🇮 Finland


databricks-sql-lab LANG multi STARS 0 LICENSE MIT
OPEN SOURCE BUILT IN PUBLIC HANDS ON LABS DOCUMENTED

Practice Databricks SQL on a serverless SQL warehouse: Delta tables, time travel, and a small medallion pipeline.


Arya Fatthurahman

Databricks SQL Lab

Practice Databricks SQL on a serverless SQL warehouse: Delta tables, time travel, and a small medallion pipeline.

Database: Databricks SQL Category: Lakehouse / analytics Runs in Cloud License: MIT

What this lab is

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.

Quickstart

  1. Create a free Databricks workspace (Free Edition or a trial) and open the SQL editor.
  2. Create or start a serverless SQL warehouse and note its HTTP path.
  3. Run examples/01_setup.sql to create the lab schema and a Delta table.
  4. Run examples/02_queries.sql to inspect the table history and query it.
  5. Run examples/03_medallion.sql to build a small bronze-to-gold chain.
  6. Optional: connect DBeaver with the JDBC URL and a PAT, never commit the token.

Connection details

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>

Examples

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.

Exercises

  1. Add a users table and join it to events to count events per signup source.
  2. Use DESCRIBE HISTORY after an UPDATE and query the previous version.
  3. Create a view that exposes only purchase events, then query it from a dashboard.
  4. Connect DBeaver using the JDBC URL and run the same queries outside the SQL editor.

Notes and limits

  • 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 OPTIMIZE depend on the workspace edition and table retention settings.
  • Costs: serverless SQL warehouses bill per second while running. Stop the warehouse when you finish.

Run it from anywhere

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.

References


Part of the database-labs collection: 26 database engines, one index.

License

MIT (c) 2026 Arya Fatthurahman. See LICENSE.


Tech Stack

Git
Full Tech Stack Wall

Languages
Rust Go TypeScript JavaScript Java Python C C++ Kotlin Swift Ruby PHP Lua Shell

Frontend & Desktop
Vue React Svelte Next.js Nuxt Flutter React Native Tauri Electron Vite HTML5 CSS3 Sass Less Tailwind CSS Bootstrap Three.js Node.js jQuery

Database & Storage
MySQL PostgreSQL SQLite SQL Server Oracle Redis MongoDB DuckDB ClickHouse Elasticsearch Neo4j InfluxDB Cassandra DynamoDB Firebase Supabase MinIO Firebird IBM DB2 MariaDB CockroachDB IRIS Databricks SQL Snowflake Qdrant Redshift Apache Kylin BigQuery VictoriaMetrics Databend TDengine Teradata

Messaging & Streaming
Kafka RabbitMQ RocketMQ Pulsar Flink

DevOps & Cloud Native
Docker Kubernetes Terraform Ansible Jenkins GitHub Actions GitLab CI Prometheus Grafana Nginx AWS Azure Cloudflare

Tools & Platforms
Git Linux macOS VS Code Vim Tmux Homebrew Postman Figma Markdown Maven Gradle CMake

Hands-on engineering, built and documented in the open.

DBX Connections

Firebird_5n1b JDBCX_d5pn IBM DB2_0leg MariaDB_80g9 SQL Server_wieh CockroachDB_mo9c IRIS_cz3h Databricks_SQL_rmue Snowflake_cm_h9 Redis_u0tv Qdrant_1r3s Elasticsearch_zfc3 Cassandra_d8eb MongoDB_vexq Redshift_p9d7 Apache Kylin_xmpz Neo4j_j3dsg BigQuery_homk Apache Kafka_xpqk VictoriaMetrics_m3sf InfluxDB_wuju Databend_dey6 TDengine_4c9i Teradata_rwlm

Connection names shown in the DBX sidebar - decorative reference badges.

About

Practice Databricks SQL on a serverless SQL warehouse: Delta tables, time travel, and a small medallion pipeline.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors