Monday, 5 October 2020

How to access data in Delta tables


Delta tables can be accessed either by specifying the path on DBFS or by table name.

You can check my previous blog to see how to write delta files here.  I will be using the same example location here.


Option 1 : Read delta tables by specifying DBFS path

val employeeDF = spark.read.format("delta").load("/mnt/delta/Employee")


Option 2 : Read delta table by  table name

val employeeDF = spark.table("employee")

No comments:

Post a Comment