soumilshah1995 commented on issue #8894:
URL: https://github.com/apache/hudi/issues/8894#issuecomment-1580714127
You are right
we want to keep the folder for later time travel and incremental purposes.
i just verified this on athena data does not shows up for that partition
```
# ============DELETE PARTITION ================
# ============DELETE PARTITION ================
print(
"Connecticut",
spark.read.format("hudi").load(path).where("state='Connecticut'").count()
)
hudi_options = {}
try:
spark.createDataFrame([], StructType([])) \
.write \
.format("org.apache.hudi") \
.options(**hudi_options) \
.option("hoodie.datasource.hive_sync.enable", False) \
.option("hoodie.datasource.write.operation", "delete_partition") \
.option("hoodie.datasource.write.partitions.to.delete",
"Connecticut") \
.mode("append") \
.save(path)
print("1.. ")
except Exception as e:
print("Error 1", e)
try:
spark.createDataFrame([], StructType([])) \
.write \
.format("org.apache.hudi") \
.options(**hudi_options) \
.option("hoodie.datasource.hive_sync.enable", False) \
.option("hoodie.datasource.write.operation", "delete_partition") \
.option("hoodie.datasource.write.partitions.to.delete",
"state=Connecticut") \
.mode("append") \
.save(path)
print("2.. ")
except Exception as e:
print("Error 2", e)
print(
"Connecticut ** ",
spark.read.format("hudi").load(path).where("state='Connecticut'").count()
)
```

@ad1happy2go we should update website i didnt know hudi had delete
partition until i saw a message on slack can we add this on hudi website
Also i will be making a video for community on this topic
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]