I'm using this chunk of code to save my Dataframe on specific S3 bucket location:
df.coalesce(1).write\
.format("csv")\
.mode("append")\
.save(f"s3://{bucket_output}/{dirname}/{filename}", header=True, nullValue = '\u0000', emptyValue = '\u0000')
I couldn't find anywhere in the web, information about changing the localization and the name of such a .csv file, using Python from a Glue job. Now, the csv file is saved not as a filename
file, but in the directory named filename
and the name of this csv is part-(some_numbers).csv
.
How to get around it? Any move operation on S3 bucket or something?