I would like to know what is the best way to load a delta table specific partition ? Is option 2 loading the all table before filtering ?
option 1 :
df = spark.read.format("delta").option('basePath','/mnt/raw/mytable/')\
.load('/mnt/raw/mytable/ingestdate=20210703')
(Is the basePath option needed here ?)
option 2 :
df = spark.read.format("delta").load('/mnt/raw/mytable/')
df = df.filter(col('ingestdate')=='20210703')
Many thanks in advance !