0

How do I add an HBase Timestamp using Phoenix-Spark similiar to HBase API:

Put(rowkey, timestamp.getMillis)

This is my code:

val rdd = processedRdd.map(r => Row.fromSeq(r))
val dataframe = sqlContext.createDataFrame(rdd, schema)
dataframe.save("org.apache.phoenix.spark", SaveMode.Overwrite,
    Map("table" -> HTABLE, "zkUrl" -> zkQuorum))
sophie
  • 991
  • 2
  • 15
  • 34

2 Answers2

1

You can use the following:

dataframe.write.format("org.apache.phoenix.spark").mode("overwrite").option("table", "HTable").option("zkUrl", "xxxx:0000").save()
Paul Roub
  • 36,322
  • 27
  • 84
  • 93
sparkDabbler
  • 518
  • 2
  • 7
  • 20
0

This feature is currently not supported in Phoenix. Maybe, you need to use HBase api instead of Phoenix.

Anil Gupta
  • 1,116
  • 2
  • 8
  • 13