Introduction to Databricks SQL
Kevin Barlow
Data Manager
INSERT INTO students
TABLE visiting_students;
MERGE INTO target USING source
ON target.key = source.key
WHEN MATCHED THEN UPDATE SET *;
OPTIMIZE
Z-ORDER
> OPTIMIZE table_name;
> OPTIMIZE table_name
WHERE date >= '2024-01-01';
> OPTIMIZE table_name
WHERE date >= current_timestamp()
- INTERVAL 1 day
ZORDER BY (eventType);
Introduction to Databricks SQL