Re: Withcolumn date with sysdate
put default value inside lit df.withcolumn("date",lit("constant value")) On Fri, Jun 30, 2017 at 10:20 PM, sudhir kwrote: > 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
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