I want to update a table named EMPLOYEE in hbase, which looks like the following and the row key is ID.
ID,Name,Age
"1","John","34"
"2","David","22"
I want to add another column named City in this table. Using Apache phoenix I executed this command first to alter the existing schema.
ALTER TABLE "EMPLOYEE" ADD IF NOT EXISTS "CITY" VARCHAR(40)
This command executed successfully. Then I tried to insert values. Using the following command.
UPSERT INTO "EMPLOYEE" ("ID","CITY") VALUES ("1", "London")
However every time I execute this, I get the following error -
Exception in thread "main" java.sql.SQLException: ERROR 204 (22008): Values in UPSERT must evaluate to a constant.
What is it what I am missing here, that is causing the error.