https://delta.io logo
d

Daniel Bariudin

05/24/2023, 8:17 AM
Hey all, I am using isDeltaTable method (Delta version 2.0.0) in my Jupyter notebook and have weird behavior with this code:
Copy code
DeltaTable.isDeltaTable(spark, "/path/to/table")
For given root path:
"/path/to/table"
if the sub path
"/path/to"
has deltalog directory, the function return True. The Documentation the provided is: "classmethod *`isDeltaTable`*(sparkSession: pyspark.sql.session.SparkSession, identifier: str) → bool Check if the provided identifier string, in this case a file path, is the root of a Delta table using the given SparkSession." _(_https://docs.delta.io/latest/api/python/index.html) So the question is : if the root the I provided path don't contains Delta table , but the sub-root path has delta table and 'isDeltaTable' returns True - is this not a bug? or am I missing something?
@Nick Karpov Can you please help?🙏
n

Nick Karpov

05/30/2023, 7:15 PM
image.png
it's a bug if that's actually what's happening, but that's not the behavior I see ^^ @Daniel Bariudin
d

Daniel Bariudin

06/01/2023, 9:00 PM
Hey, @Nick Karpov, thanks for the reply. I think you misunderstood me. What I meant was that if there is a delta table in the path "/tmp/tables" but not in "/tmp/tables/deltatest", the function IsDeltaTable(spark, "/tmp/tables/deltatest") will return True.
Here is a Java code:
@Nick Karpov any suggestions?🙏