'ksqldb updating with null values in insert statement
I am trying to insert some values into a stream as follows:
ksql> create stream test(id bigint key, col1 varchar, col2 varchar) with(kafka_topic='test', partitions=3, value_format='json');
Message
----------------
Stream created
----------------
ksql> insert into test(id, col1) values(2, 'hey');
ksql> insert into test(id, col1) values(2, 'hello');
ksql> insert into test(id, col2) values(2, 'Hii');
ksql> select * from test;
+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+
|ID |COL1 |COL2 |
+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+
|2 |hey |null |
|2 |hello |null |
|2 |null |Hii
upon inserting the third entry, the col1 becomes null but this is not the value that I inserted. I just inserted into col2. Is there a way to not override other columns with null when it is not requested in insert?
Thank you.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
