Member since
10-20-2022
3
Posts
0
Kudos Received
0
Solutions
10-20-2022
04:09 AM
Hello everybody, I'm facing with a very weird behaviour with an UPSERT instruction: the operation doesn't have effect on columns that was previously stored with null value; I have 'tab1' defined as create table IF NOT EXISTS tab1(id VARCHAR not null, eventdate TIMESTAMP not null, category VARCHAR, history VARBINARY); UPSERT into tab1(id,eventdate,category,history) values ('id1',to_timestamp('2022-10-20 00:00:00.0','test',null); now I just try to execute the following statement: UPSERT into tab1(id,eventdate,category,history) values ('id1',to_timestamp('2022-10-20 00:00:00.0','edited test','ABC'); this is the resulting table: SELECT * FROM tab1 +-----+-----------------------+-------------+---------+ | id | eventdate | category | history | +-----+-----------------------+-------------+---------+ | id1 | 2022-10-20 00:00:00.0 | edited test | | +-----+-----------------------+-------------+---------+ I've tryied many times and in different way (upserting from select, upserting different values) but anything doesn't works and 'history' column keep his original "null value" does it depends on some property/configuration/anything? can anybody help me to solve this issue? I've also found a different 3d on this forum, but the answer doesn't give me any help ( https://community.cloudera.com/t5/Support-Questions/Apache-Phoenix-Upsert-not-working-while-trying-to-update/m-p/355612 ) thank you all UPDATE: this issue is present only on some records, I've tried the UPSERT on some other "fake" records and the statement works perfectly!
... View more
Labels:
- Labels:
-
Apache Phoenix
10-20-2022
01:39 AM
Hello, I know this is aged topic... but I have the same issue. I've not understood the answer from @schhabra1 : ok, hbase does not store NULL, but with "step2" @ananya_antony is trying to upsert the previous value... is there any setting to configure in order to update previously "not stored column" with a new "not null" value? can anybody give me some clues please? thanks
... View more