How do I write dataframe to s3 without partition column name on the path
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2024 06:28 AM
I am currently trying to write a dataframe to s3 like
df.write
.partitionBy("col1","col2")
.mode("overwrite")
.format("json")
.save("s3a://my_bucket/")
The path becomes `s3a://my_bucket/col1=abc/col2=opq/`
But I want to path to be `s3a://my_bucket/abc/opq/`
Is there a way to write the dataframe with a path removing the partition column name?