Delta SQL Commands

Delta Lake supports the SQL commands. They can be registered in a Spark application using DeltaSparkSessionExtension.

The SQL commands support table of the format delta.`path` (with backticks), e.g. delta.`/tmp/delta/t1` while path is between single quotes, e.g. '/tmp/delta/t1'.

Table 1. Delta SQL Commands
Name Description

CONVERT TO DELTA

CONVERT TO DELTA table
  (PARTITIONED BY '(' colTypeList ')')?

DESCRIBE DETAIL

(DESC | DESCRIBE) DETAIL (path | table)

DESCRIBE HISTORY

(DESC | DESCRIBE) HISTORY (path | table)
  (LIMIT limit)?

GENERATE

GENERATE modeName FOR TABLE table

VACUUM

VACUUM (path | table)
  (RETAIN number HOURS)? (DRY RUN)?