Am newbie with Python ... trying to read parquet files from Databricks, but when the file is empty is throwing error. How can i check filesize before reading it into DataFrame. Code below:
%python
##check if file is empty ???
##if not empty read
##else do something else
try:
parquetDF =
spark.read.parquet("wasbs://XXXXX@XXXX.blob.core.windows.net/XXXX/2019-10- 11/account.parquet")
except:
print('File is Empty !!!')