Re: Withcolumn date with sysdate

2017-06-30 Thread Pralabh Kumar
put default value inside lit

df.withcolumn("date",lit("constant value"))

On Fri, Jun 30, 2017 at 10:20 PM, sudhir k  wrote:

> Can we add a column to dataframe with a default value like sysdate .. I am
> calling my udf but it is throwing error col expected .
>
> On spark shell
> df.withcolumn("date",curent_date) works I need similiar for scala program
> which I can build in a jar
>
>
> Thanks,
> Sudhir
> --
> Sent from Gmail Mobile
>


Withcolumn date with sysdate

2017-06-30 Thread sudhir k
Can we add a column to dataframe with a default value like sysdate .. I am
calling my udf but it is throwing error col expected .

On spark shell
df.withcolumn("date",curent_date) works I need similiar for scala program
which I can build in a jar


Thanks,
Sudhir
-- 
Sent from Gmail Mobile