Create a stream with a defined TIMESTAMP

Hi together

I really struggle to create a stream with a defined TIMESTAMP. It seems the default setting TIMESTAMP = ROWTIME it is working…

DROP STREAM S_player_raw;

CREATE STREAM S_player_raw(
  gameId BIGINT,
  time VARCHAR,
  gtime VARCHAR,
  gtime_ms BIGINT,
  `period` BIGINT,
  range BIGINT,
  team BIGINT,
  number BIGINT,
  player_x DOUBLE,
  player_y DOUBLE
)
 WITH (
    KAFKA_TOPIC = 'T_player_raw',
    VALUE_FORMAT='JSON',
    TIMESTAMP='time',
    TIMESTAMP_FORMAT='yyyy-MM-dd'' ''hh:mm:ss.SS'
);

SELECT  *
FROM S_player_raw
EMIT CHANGES LIMIT 50;

If I remove the “TIMESTAMP” and the “TIMESTAMP_FORMAT” lines, the select is showing data.

As I do not get new records at the moment, I have the following setting to use the old records:

Set 'auto.offset.reset' = 'earliest';

I would be very thankful for help :)!

My guess is that there’s an error in processing the timestamp with the format you’ve given. Check the processing log where these errors will be logged. You can also use the ksqlDB server log itself.

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.