I am using Spark 1.3, HBase 1.1 and Phoenix 4.4. I have this in my code:
val dataframe = sqlContext.createDataFrame(rdd, schema)
dataframe.save("org.apache.phoenix.spark", SaveMode.Overwrite,
Map("table" -> "TEST_SCHEMA.TEST_HTABLE", "zkUrl" -> zkQuorum))
CREATED_DATE is always set to DateTime.now() in the dataframe.
I don't want the field to be updated if the row already exists in HBase, yet there's an update in other fields.
I can achieve it using HBase's checkAndPut: Put all the fields and use checkAndPut on created_date field.
But how do I do that using Phoenix-Spark API? Should I use HBase API instead?