## Delta check when a file was added
%scala
(oldest-version-available to newest-version-available).map { version =>
var df = spark.read.json(f"<delta-table-location>/_delta_log/$version%020d.json").where("add is not null").select("add.path")
var df2 = df.filter('path.contains("name-of-the-parquet-file"))
if (df2.count > 0) {
print("********* " + version)
}
}
@Dean Lovelaceโ - Please use the above code snippet to identify in which available version the file is present.
change oldest-version-available to newest-version-available for the numbers of the delta History that you would like to check change the delta path to your delta table.
If you are facing this issue while reading (after doing FSCK REPAIR), could you please try using the below config.
spark.sql.files.ignoreCorruptFiles true
spark.sql.files.ignoreMissingFiles true