I'm trying to export a Dataframe to a CSV file using .NET SPARK, but my export file has the default name 'part-00000-{GUID}', what i wanted was to manipulate the file's name according to my business rules, ex:'ABC_20200504.csv'.
This is my code:
string pathSource = Path.Combine(path, folderName);
exportDataFrame
.Coalesce(1)
.Write()
.Option("header", "false")
.Mode(SaveMode.Append)
.Csv(pathSource);
I tried to manipulate the pathSource, forcing to export into a 'test.csv', but using this approach, I always get a directory with that name and the file will be inside the folder 'test.csv'.
I really need some solution for this, if someone could help, i would be very thankfull.