I'm using the Kafka table connector and running in...
# troubleshooting
r
I'm using the Kafka table connector and running into this error. Anyone know what it means or how to avoid it? (taskmanager log)
Copy code
at org.apache.flink.connector.kafka.source.reader.KafkaRecordEmitter.emitRecord(KafkaRecordEmitter.java:53) ~[blob_p-e67e50026bc5eb27e5ef73366fe6646a2c7bf724-bf71118f8fe204c7b2b4c4534ddf3f99:?]
	... 14 more
Caused by: java.lang.RuntimeException: RowTime field should not be null, please convert it to a non-null long value.
j
what's your DDL statement? check the eventtime field in the kafka message if it's NULL
r
that was the case, my DDL schema was
Copy code
`timestamp` STRING,
`event_time` AS TO_TIMESTAMP(`timestamp`, 'yyyy-MM-dd''T''HH:mm:ss.SSSz'),
WATERMARK FOR `event_time` AS `event_time` - INTERVAL '1' MINUTE
and there was a record with a timestamp without millis, like
2024-10-04T04:51:57Z
, which caused the event time to be null. as a followup, I'm wondering is there a better way to handle records with a different format? I would not like the job to crash if there's some malformed data
j
have you tried using brackets for the optional section of the format string?
r
Yeah, that fixed it
πŸ‘ 1