Re: Spark CSV Quote only NOT NULL

2019-07-13 Thread Swetha Ramaiah
Thanks and Regards, > Gourav > > On Fri, Jul 12, 2019 at 6:51 AM Swetha Ramaiah > wrote: > >> Hi Anil >> >> That was an example. You can replace quote with what double quotes. But >> these options should give you an idea on how you want treat nulls, empty >&

Re: Spark CSV Quote only NOT NULL

2019-07-11 Thread Swetha Ramaiah
11, 2019, at 4:09 PM, Anil Kulkarni wrote: > > Hi Swetha, > > Thank you. > But we need the data to be quoted with ". > and when a field is null, we dont need the quotes around it. > > Example: > "A",,"B","C" > Thanks > Anil >

Re: Spark CSV Quote only NOT NULL

2019-07-11 Thread Swetha Ramaiah
If you are using Spark 2.4.0, I think you can try something like this: .option("quote", "\u") .option("emptyValue", “”) .option("nullValue", null) Regards Swetha > On Jul 11, 2019, at 1:45 PM, Anil Kulkarni wrote: > > Hi Spark users, > > My question is : > I am writing a Dataframe to