I have some sales data and created DataFrame using a CSV file. In this DataFrame I need to add two additional columns process_date
and next_processing_date
. So written like this:
baseData.withColumn("Return_Grace_period", current_date()).withColumn("Next_processing_date", current_date() + 10).show()
Here current_date()+10
is causing an issue. In oracle we can use 10 for getting the next date. How can I do so in Spark?