Spark - How to write a single csv file WITHOUT folder?
问题 Suppose that df is a dataframe in Spark. The way to write df into a single CSV file is df.coalesce(1).write.option("header", "true").csv("name.csv") This will write the dataframe into a CSV file contained in a folder called name.csv but the actual CSV file will be called something like part-00000-af091215-57c0-45c4-a521-cd7d9afb5e54.csv . I would like to know if it is possible to avoid the folder name.csv and to have the actual CSV file called name.csv and not part-00000-af091215-57c0-45c4