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:
if the sub path
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." _(_ 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?🙏

Nick Karpov

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

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?🙏