Truncate delta table in Databricks
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2021 09:29 AM
I cannot find how to truncate table using pyspark or python commnd , I need to truncate delta table using python
Labels:
- Labels:
-
SQL
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2021 09:31 AM
Not everything is exposed as a function for Python or Java/Scala. Some operations are SQL-only, like
spark.sql("TRUNCATE TABLE delta.`<path>`")