spark csv output : getting empty quotes instead of blank or space

618 Views Asked by At

I am trying to find a solution to have the empty quotes in the csv file replaced with a blank space with no quotes. I tried below, but i get a 0 instead of a space in the csv file. Can someone lmk how to get a space instead of "" in the final csv file when the value is empty, thanks.

                    ```outputDS
                    .write()
                    .mode(SaveMode.Append)
                    .option("header", true)
                    .option("delimiter", "\t")
                    .option("emptyValue", null)
                    .option("encoding", "UTF-8")
                    .csv(fullOutputPath);```
0

There are 0 best solutions below