Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to delete a Parquet file on Spark?

I have saved a parquet file on Spark using DataFrame.saveAsParquet() command.

How can I delete/remove this file via python code?

like image 935
guptashail Avatar asked Nov 16 '25 01:11

guptashail


1 Answers

This parquet "file" will actually be a directory. This answer shows how to delete a directory with files in it

import shutil
shutil.rmtree('/folder_name')
like image 65
David Avatar answered Nov 17 '25 20:11

David



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!