I am running the below:
for x in days:
for i in numbers:
mega_query = spark.sql("select * " \
"from db.table " \
"where date ={} " \
"and number = {} ".format(x, 1))
mega_query.write.mode('append').options(header='true').save("/path/results2.csv")
I want to have one csv file at the end but instead of that I have many snappy.parquet files. How can I create only one csv with the results?