In general it needs to be a Seq of Tuples for the implicit toDF to work
(which is a little tricky when there is only one column).
scala Seq(Tuple1(new
java.sql.Timestamp(System.currentTimeMillis))).toDF(a)
res3: org.apache.spark.sql.DataFrame = [a: timestamp]
or with multiple columns
scala
Hi Guys,
I have struggled for a while on this seeming simple thing:
I have a sequence of timestamps and want to create a dataframe with 1 column.
Seq[java.sql.Timestamp]
//import collection.breakOut
var seqTimestamp = scala.collection.Seq(listTs:_*)
seqTimestamp: Seq[java.sql.Timestamp] =
Please take a look at stringToTimestamp() in
./sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala
Representing timestamp with long should work.
Cheers
On Fri, Jul 31, 2015 at 2:50 PM, Joanne Contact joannenetw...@gmail.com
wrote:
Hi Guys,
I have struggled for