cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

Truncate delta table in Databricks

User16826994223
Honored Contributor III

I cannot find how to truncate table using pyspark or python commnd , I need to truncate delta table using python

1 REPLY 1

User16826994223
Honored Contributor III

Not everything is exposed as a function for Python or Java/Scala. Some operations are SQL-only, like 

spark.sql("TRUNCATE TABLE delta.`<path>`")

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.