I have the following RDD with thousands of entries as (Int, Double) which I would like to add a column as a timestamp, such that it becomes (Int, Double, Datetime). I tried the following:
val addTimeStampRDD = OriginalRDD.map {
case(a, b) =>
(a, b, current_timestamp())}
Unfortunately the job to fail with errors such as:
java.lang.NoClassDefFoundError: scala/Product$class
Is this because the timestamp is a SQL function? Is there a better alternative than this?