Delta lake is supported in the latest version of Apache Spark. Delta Lake is open sourced with Apache 2.0 license. So it is free to use. Delta Lake is supported in Apache Spark versions above 2.4.2. It is very easy to set up and it does not require any admin skills to configure. Delta Lake is available by default in Databricks. We don’t have to do any installation or configuration to use this Delta Lake in Databricks.

For trying out the basic example, launch pyspark or spark-shell by adding the delta package. No need of any additional installation. Just use the following command

For pyspark

pyspark --packages
For spark-shell
bin/spark-shell --packages

The above command/s will add delta package to the context and delta lake will be enabled. You can try out the following basic example in the pyspark shell.

# Create a temparory dataset
data = spark.range(0, 50)
# Read the data
df ="delta").load("/tmp/myfirst-delta-table")
# Updating the dataset
data = spark.range(51, 100)
# Read the data
df ="delta").load("/tmp/myfirst-delta-table")
# Read the older version of data
df ="delta").option("versionAsOf", 0).load("/tmp/myfirst-delta-table")