Cory Grinstead
03/26/2025, 4:09 PMoverwrite and overwrite-partitions?
ex:
df.write_csv("data", write_mode="overwrite", partition_cols=["a"])
df.write_csv("data", write_mode="overwrite-partitions", partition_cols=["a"])
I'm trying to add overwrite to spark, but I broke a few tests & having a hard time understanding what the actual expected output is here.Colin Ho
03/26/2025, 4:17 PMoverwrite, all files in the target dir will be overwritten. With overwrite-partitions, only the files in directories target_dir/partition_1/..., target_dirpartition_2/... and target_dir/partition_3/... will be overwritten. If you had say targert_dir/partition_4, target_dir/partition_5, these would not be overwriten because the data did not contain partition values 4 and 5