Open swapkh91 opened 6 months ago
Same issue here - I've also opened an issue on the main starrocks repo: Creating a starrocks table with a DATETIME column that defaults to current_timestamp does not populate the DATETIME column when inserting via kafka connector
CREATE TABLE IF NOT EXISTS events ( timestamp DATETIME DEFAULT current_timestamp, id STRING NOT NULL, event STRING NOT NULL, meta JSON NOT NULL ) ENGINE=OLAP ORDER BY (timestamp, id, event);
then perform insert/s via the kafka connector that exclude the "timestamp" column, results in null for the timestamp. Please note that this does NOT happen when performing inserts directly (via a mysql client).
That insertions via the kafka-connector where the DATETIME field is missing would result in the DEFAULT (i.e. current date/time) being inserted.
When inserting from kafka-connector without providing the "timestamp" field, the column is not DEFAULTed to the current date/time. The value is inserted with null.
docker/container starrocks/allin1-ubuntu:3.3-latest starrocks-kafka-connector from github repo as of (10-16-2024)
I'm using the connector to load data to a table where I have a column
rowtime
with default value asCURRENT_TIMESTAMP
When sending json data through the connector, this column doesn't get populated with current timestamp, instead NULL is set as value
table structure
connector yaml
ROUTINE LOAD works fine in this case
sample json