https://delta.io logo
o

Ovi

03/14/2023, 10:37 AM
Hello everyone, From a list of folders on s3, how can I identify from Databricks which ones are Delta tables which are not?
g

Gerhard Brueckl

03/14/2023, 10:39 AM
if they have a sub-folder called
_delta_log
it is very likely a Delta Lake table
or you simply try to read them as a Delta table
o

Ovi

03/14/2023, 10:44 AM
Got it, thanks!
j

JosephK (exDatabricks)

03/14/2023, 10:59 AM
You can use dbutils.fs.ls to look at the file types inside the folders. There is nothing in a folder name that would indicate if it has a file in it let alone what kinds of files
m

Matthew Powers

03/14/2023, 11:43 AM
The isDeltaTable class method might be useful.
Copy code
DeltaTable.isDeltaTable(spark, "/path/to/table")
👍 2
o

Ovi

03/14/2023, 12:55 PM
Good one @Matthew Powers! Thanks a lot!
4 Views