Apache spark newbie here. I am querying a very large data set from ADLS using Apache Spark for .net. After querying my data, i want to convert the dataframe to a csv file and send it to an api that consumes the csv file. I have the following
queryResult_df
.Coalesce(1)
.Write()
.Format("csv")
.Option("header", "true")
.Csv(<local_output_location>)
This takes hours to complete and is not optimal for what i'm trying to do. Is there a way to generate the csv in a more optimal way and send it off to the consuming api rather than output it locally?